-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfiguration.cs
32 lines (28 loc) · 897 Bytes
/
Configuration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace App.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using WinForm.Entities.Authentication;
using WinForm.Entities.Security;
internal sealed class Configuration : DbMigrationsConfiguration<TestModelContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = true;
ContextKey = "GenericWinAppTests";
}
protected override void Seed(App.TestModelContext context)
{
context.Roles.AddOrUpdate(
r => r.Id
,
new Role { Id = 1, Name = "Root",Hidden= true },
new Role { Id = 2, Name = "Admin" },
new Role { Id = 3, Name = "User" },
new Role { Id = 4, Name = "Project Management system" }
);
}
}
}