Exemple #1
0
 public Result InsertRoleInPerm(RoleInPermDto dto)
 {
     try
     {
         var model = dto.MapTo <RoleInPermEntity>();
         var id    = UnitOfWorkService.Execute(() => _repo.InsertAndGetId(model));
         if (id <= 0)
         {
             return(new Result(false, "添加失败"));
         }
         return(new Result(true, ""));
     }
     catch (Exception ex)
     {
         Logger.Error($"add roleInPerm to exception:{ex}");
         return(new Result(false, ""));
     }
 }