Exemplo n.º 1
0
 public Result Delete(string id)
 {
     try
     {
         var rlt = UnitOfWorkService.Execute(() => _prodRepository.Delete(id));
         if (!rlt)
         {
             return new Result {
                        Status = false, Message = "数据库操作失败"
             }
         }
         ;
         return(new Result {
             Status = true
         });
     }
     catch (Exception ex)
     {
         Logger.Error("delete prod error:", ex);
         return(new Result {
             Status = false, Message = "内部服务器错误"
         });
     }
 }