部门种子数据
This commit is contained in:
@@ -24,6 +24,9 @@ namespace Yi.Framework.WebCore.DbExtend
|
||||
var roles = SeedFactory.GetRoleSeed();
|
||||
var menus = SeedFactory.GetMenuSeed();
|
||||
var dicts= SeedFactory.GetDictionarySeed();
|
||||
var posts = SeedFactory.GetPostSeed();
|
||||
var dictinfos= SeedFactory.GetDictionaryInfoSeed();
|
||||
var depts = SeedFactory.GetDeptSeed();
|
||||
if (!_Db.Queryable<UserEntity>().Any())
|
||||
{
|
||||
_Db.Insertable(users).ExecuteCommand();
|
||||
@@ -43,6 +46,20 @@ namespace Yi.Framework.WebCore.DbExtend
|
||||
{
|
||||
_Db.Insertable(dicts).ExecuteCommand();
|
||||
}
|
||||
if (!_Db.Queryable<PostEntity>().Any())
|
||||
{
|
||||
_Db.Insertable(posts).ExecuteCommand();
|
||||
}
|
||||
if (!_Db.Queryable<DictionaryInfoEntity>().Any())
|
||||
{
|
||||
_Db.Insertable(dictinfos).ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
if (!_Db.Queryable<DeptEntity>().Any())
|
||||
{
|
||||
_Db.Insertable(depts).ExecuteCommand();
|
||||
}
|
||||
|
||||
if (!_Db.Queryable<UserRoleEntity>().Any())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user