This commit is contained in:
2018-09-05 22:02:23 +00:00
parent e0e5dd1942
commit cd52c3e83f
7 changed files with 46 additions and 14 deletions

View File

@@ -9,6 +9,7 @@ using AyaNova.Models;
namespace AyaNova.Biz
{
//Prime the database with initial, minimum required data to boot and do things (manager account, locales)
public static class PrimeData
{
// private readonly AyContext ct;
@@ -21,7 +22,7 @@ namespace AyaNova.Biz
// }
/// <summary>
/// Prime the database
/// Prime the database with manager account
/// </summary>
public static void PrimeManagerAccount(AyContext ct)
{
@@ -39,6 +40,9 @@ namespace AyaNova.Biz
u.UserType=UserType.Administrator;
ct.User.Add(u);
ct.SaveChanges();
UserOptions UO=new UserOptions(1,1);
ct.UserOptions.Add(UO);
ct.SaveChanges();
}