添加字典初始化
This commit is contained in:
@@ -23,6 +23,7 @@ namespace Yi.Framework.WebCore.DbExtend
|
||||
var users = SeedFactory.GetUserSeed();
|
||||
var roles = SeedFactory.GetRoleSeed();
|
||||
var menus = SeedFactory.GetMenuSeed();
|
||||
var dicts= SeedFactory.GetDictionarySeed();
|
||||
if (!_Db.Queryable<UserEntity>().Any())
|
||||
{
|
||||
_Db.Insertable(users).ExecuteCommand();
|
||||
@@ -38,6 +39,11 @@ namespace Yi.Framework.WebCore.DbExtend
|
||||
_Db.Insertable(menus).ExecuteCommand();
|
||||
}
|
||||
|
||||
if (!_Db.Queryable<DictionaryEntity>().Any())
|
||||
{
|
||||
_Db.Insertable(dicts).ExecuteCommand();
|
||||
}
|
||||
|
||||
if (!_Db.Queryable<UserRoleEntity>().Any())
|
||||
{
|
||||
_Db.Insertable(SeedFactory.GetUserRoleSeed(users, roles)).ExecuteCommand();
|
||||
|
||||
Reference in New Issue
Block a user