public Task <int> Save(AreaEntity areaEntity, string keyValue, HttpContext httpContext)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         areaEntity.AttachModifyInfo(keyValue, httpContext);
         return(areaRepo.UpdateAsync(areaEntity));
     }
     else
     {
         areaEntity.AttachCreateInfo(httpContext);
         return(areaRepo.InsertAsync(areaEntity));
     }
 }
Example #2
0
 public Task <int> Save(AreaEntity organizeEntity, string keyValue, string userId)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         organizeEntity.AttachModifyInfo(keyValue, userId);
         return(repo.UpdateAsync(organizeEntity));
     }
     else
     {
         organizeEntity.AttachCreateInfo(userId);
         return(repo.InsertAsync(organizeEntity));
     }
 }