Add project files.
parent
4f7084462b
commit
a758d855a7
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="MovieDBBase" connectionString="Data Source=(localdb)\mssqllocaldb;Initial Catalog=MovieDBDev" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="mssqllocaldb" />
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
</providers>
|
||||
</entityFramework>
|
||||
</configuration>
|
@ -0,0 +1,33 @@
|
||||
namespace MovieDB.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Linq;
|
||||
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<MovieDB.MovieDBContext>
|
||||
{
|
||||
public Configuration()
|
||||
{
|
||||
AutomaticMigrationsEnabled = true;
|
||||
ContextKey = "MovieDB.MovieDBContext";
|
||||
AutomaticMigrationDataLossAllowed = true;
|
||||
}
|
||||
|
||||
protected override void Seed(MovieDB.MovieDBContext context)
|
||||
{
|
||||
// This method will be called after migrating to the latest version.
|
||||
|
||||
// You can use the DbSet<T>.AddOrUpdate() helper extension method
|
||||
// to avoid creating duplicate seed data. E.g.
|
||||
//
|
||||
// context.People.AddOrUpdate(
|
||||
// p => p.FullName,
|
||||
// new Person { FullName = "Andrew Peters" },
|
||||
// new Person { FullName = "Brice Lambson" },
|
||||
// new Person { FullName = "Rowan Miller" }
|
||||
// );
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
|
||||
</packages>
|
Loading…
Reference in New Issue