From 3e9e39bea9987883421f90df7467721c167ccc8d Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Thu, 1 Nov 2018 10:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9AMongoDB=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E8=A7=92=E8=89=B2=E4=BD=BF=E7=94=A8Role=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.DataAccess.MongoDB/Role.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Bootstrap.DataAccess.MongoDB/Role.cs b/Bootstrap.DataAccess.MongoDB/Role.cs index f9522b30..8b8473a9 100644 --- a/Bootstrap.DataAccess.MongoDB/Role.cs +++ b/Bootstrap.DataAccess.MongoDB/Role.cs @@ -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() + }); return true; } else