예제 #1
0
 public virtual T ValidateDelete(Guid id, out string message)
 {
     if (id == default(Guid))
     {
         message = string.Format("[{0}]的[{1}]不得为默认值", EntityName, EntityExtensions.GetDisplay(EType, "Id"));
         return(default(T));
     }
     //if (!this.Exist(e => e.Id == id))
     //{
     //    message = string.Format("编号为[{0}]的[{1}]的数据不存在", id, EntityName);
     //    return default(T);
     //}
     message = string.Empty;
     return(this.Get(id));
 }