예제 #1
0
        /**********************删除**********************/

        public bool Delete <T>(Expression <Func <T, bool> > Where) where T : BaseEntity, new()
        {
            try
            {
                if (delete.Delete <T>(Where))
                {
                    return(true);
                }
                throw new Exception("操作失败");
            }
            catch (Exception ex)
            {
                SetError(ex.Message);
                return(false);
            }
        }
예제 #2
0
 public bool Delete(BaseModel entity)
 {
     try
     {
         if (delete.Delete(entity))
         {
             return(true);
         }
         throw new Exception("操作失败");
     }
     catch (Exception ex)
     {
         SetError(ex.Message);
         return(false);
     }
 }