修改BUG:MongoDB新建角色使用Role类

This commit is contained in:
Argo-MacBookPro 2018-11-01 10:38:11 +08:00
parent b7e1c19e20
commit 3e9e39bea9
1 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,12 @@ namespace Bootstrap.DataAccess.MongoDB
if (p.Id == "0")
{
p.Id = null;
MongoDbAccessManager.Roles.InsertOne(p as Role);
MongoDbAccessManager.Roles.InsertOne(new Role()
{
RoleName = p.RoleName,
Description = p.Description,
Menus = new List<string>()
});
return true;
}
else