Пример #1
0
 public ReturnResult <bool> Delete(Client model)
 {
     using (clientDal)
     {
         return(clientDal.Delete(model));
     }
 }
Пример #2
0
        public ApiResult <bool> Delete(Client model)
        {
            using var t = new Trans();
            var res = mapDal.DeleteCustom("where client_id=@client_id ", new { client_id = model.id });

            if (!res.Result)
            {
                return(new ApiResult <bool>()
                {
                    Message = "删除失败"
                });
            }
            res = clientDal.Delete(model);
            t.Commit();
            return(res);
        }