Fix db seeding, migration, repository services
This commit is contained in:
parent
872dc1e263
commit
6b87902ca7
22 changed files with 606 additions and 64 deletions
|
@ -16,18 +16,28 @@ public record Role
|
|||
return new Role(id, name);
|
||||
}
|
||||
|
||||
private static Role? _admin = null;
|
||||
public static Role Admin
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Role(1, "Admin");
|
||||
if (_admin == null)
|
||||
{
|
||||
_admin = new Role(1, "Admin");
|
||||
}
|
||||
return _admin!;
|
||||
}
|
||||
}
|
||||
private static Role? _user = null;
|
||||
public static Role User
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Role(2, "User");
|
||||
if (_user == null)
|
||||
{
|
||||
_user = new Role(2, "User");
|
||||
}
|
||||
return _user!;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue