4 değiştirilmiş dosya ile 52 ekleme ve 75 silme
@ -1,31 +0,0 @@
@@ -1,31 +0,0 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Data.Entity; |
||||
|
||||
namespace Teknik.Models |
||||
{ |
||||
public class SampleData : DropCreateDatabaseIfModelChanges<TeknikEntities> |
||||
{ |
||||
protected override void Seed(TeknikEntities context) |
||||
{ |
||||
var user = new User |
||||
{ |
||||
Username = "Uncled1023", |
||||
JoinDate = DateTime.Now, |
||||
LastSeen = DateTime.Now |
||||
}; |
||||
context.Users.Add(user); |
||||
|
||||
var posts = new List<Post> |
||||
{ |
||||
new Post { Article = "Test Post", DatePosted = DateTime.Now, DatePublished = DateTime.Now, Title = "Test Post", Published = false} |
||||
}; |
||||
posts.ForEach(post => context.Posts.Add(post)); |
||||
|
||||
new List<Blog> |
||||
{ |
||||
new Blog {Posts = posts, User = user} |
||||
}.ForEach(blog => context.Blogs.Add(blog)); |
||||
} |
||||
} |
||||
} |
@ -1,84 +1,94 @@
@@ -1,84 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<?xml version="1.0"?> |
||||
<!-- |
||||
For more information on how to configure your ASP.NET application, please visit |
||||
http://go.microsoft.com/fwlink/?LinkId=301880 |
||||
--> |
||||
<configuration> |
||||
<configSections> |
||||
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --><!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections> |
||||
<connectionStrings configSource="ConnectionStrings.config" /> |
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
||||
</configSections> |
||||
<connectionStrings configSource="ConnectionStrings.config"/> |
||||
<!-- Create ConnectionStrings.config and add your connection string--> |
||||
<appSettings> |
||||
<add key="webpages:Version" value="3.0.0.0" /> |
||||
<add key="webpages:Enabled" value="false" /> |
||||
<add key="ClientValidationEnabled" value="true" /> |
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> |
||||
<add key="webpages:Version" value="3.0.0.0"/> |
||||
<add key="webpages:Enabled" value="false"/> |
||||
<add key="ClientValidationEnabled" value="true"/> |
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true"/> |
||||
</appSettings> |
||||
<!-- |
||||
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367. |
||||
|
||||
The following attributes can be set on the <httpRuntime> tag. |
||||
<system.Web> |
||||
<httpRuntime targetFramework="4.5.2" /> |
||||
</system.Web> |
||||
--> |
||||
<system.web> |
||||
<authentication mode="Forms" /> |
||||
<compilation debug="true" targetFramework="4.6" /> |
||||
<httpRuntime targetFramework="4.6" /> |
||||
<customErrors mode="Off"/> |
||||
<authentication mode="Forms"/> |
||||
<compilation debug="true" targetFramework="4.5.2"/> |
||||
<httpRuntime targetFramework="4.5.2"/> |
||||
</system.web> |
||||
<system.webServer> |
||||
<modules> |
||||
<remove name="FormsAuthentication" /> |
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" /> |
||||
<remove name="FormsAuthentication"/> |
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/> |
||||
</modules> |
||||
</system.webServer> |
||||
<runtime> |
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /> |
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /> |
||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /> |
||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /> |
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /> |
||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/> |
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> |
||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /> |
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> |
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> |
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> |
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/> |
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/> |
||||
</dependentAssembly> |
||||
</assemblyBinding> |
||||
</runtime> |
||||
<entityFramework> |
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> |
||||
<parameters> |
||||
<parameter value="mssqllocaldb" /> |
||||
<parameter value="mssqllocaldb"/> |
||||
</parameters> |
||||
</defaultConnectionFactory> |
||||
<providers> |
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> |
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
||||
</providers> |
||||
</entityFramework> |
||||
</configuration> |
Yükleniyor…
Yeni konuda referans