Add dbinit
This commit is contained in:
24
DAL/Helpers/DbInit.cs
Normal file
24
DAL/Helpers/DbInit.cs
Normal 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"
|
||||
//});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user