diff --git a/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs b/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs index 37043abb..3ad15531 100644 --- a/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs +++ b/src/admin/Bootstrap.DataAccess.MongoDB/Dict.cs @@ -41,6 +41,7 @@ namespace Bootstrap.DataAccess.MongoDB { if (string.IsNullOrEmpty(p.Id)) { + p.Id = null; DbManager.Dicts.InsertOne(p); p.Id = DbManager.Dicts.Find(d => d.Name == p.Name && d.Category == p.Category && d.Define == p.Define && d.Code == p.Code).FirstOrDefault().Id; } diff --git a/src/admin/Bootstrap.DataAccess.MongoDB/Group.cs b/src/admin/Bootstrap.DataAccess.MongoDB/Group.cs index bd40b042..e6d98d11 100644 --- a/src/admin/Bootstrap.DataAccess.MongoDB/Group.cs +++ b/src/admin/Bootstrap.DataAccess.MongoDB/Group.cs @@ -33,6 +33,7 @@ namespace Bootstrap.DataAccess.MongoDB { if (string.IsNullOrEmpty(p.Id)) { + p.Id = null; DbManager.Groups.InsertOne(new Group() { GroupCode = p.GroupCode, diff --git a/src/admin/Bootstrap.DataAccess.MongoDB/Menu.cs b/src/admin/Bootstrap.DataAccess.MongoDB/Menu.cs index f48cff05..2e2a3380 100644 --- a/src/admin/Bootstrap.DataAccess.MongoDB/Menu.cs +++ b/src/admin/Bootstrap.DataAccess.MongoDB/Menu.cs @@ -56,6 +56,7 @@ namespace Bootstrap.DataAccess.MongoDB { if (string.IsNullOrEmpty(p.Id)) { + p.Id = null; DbManager.Menus.InsertOne(p); p.Id = DbManager.Menus.Find(m => m.Name == p.Name && m.Category == p.Category && m.ParentId == p.ParentId && m.Url == p.Url).FirstOrDefault().Id; } diff --git a/src/admin/Bootstrap.DataAccess.MongoDB/Role.cs b/src/admin/Bootstrap.DataAccess.MongoDB/Role.cs index 5efb09d4..dd6b10dc 100644 --- a/src/admin/Bootstrap.DataAccess.MongoDB/Role.cs +++ b/src/admin/Bootstrap.DataAccess.MongoDB/Role.cs @@ -38,6 +38,7 @@ namespace Bootstrap.DataAccess.MongoDB { if (string.IsNullOrEmpty(p.Id)) { + p.Id = null; DbManager.Roles.InsertOne(new Role() { RoleName = p.RoleName,