Add dbinit

This commit is contained in:
2017-03-01 17:20:40 +02:00
commit 1d7de3c984
15 changed files with 774 additions and 0 deletions

24
DAL/Helpers/DbInit.cs Normal file
View File

@@ -0,0 +1,24 @@
using System.Data.Entity;
using Domain;
namespace DAL.Helpers
{
class DbInit: DropCreateDatabaseIfModelChanges<AppDbContext>
{
protected override void Seed(AppDbContext context)
{
// base.Seed doesn't really do anything
base.Seed(context);
//context.People.Add(new Person()
//{
// FirstName = "Arti",
// LastName = "Zirk"
//});
//context.People.Add(new Person()
//{
// FirstName = "Sala",
// LastName = "Kala"
//});
}
}
}