Exemplo n.º 1
0
 public Task <int> Save(OrganizeEntity organizeEntity, string keyValue, HttpContext context)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         organizeEntity.AttachModifyInfo(keyValue, context);
         return(service.UpdateAsync(organizeEntity));
     }
     else
     {
         organizeEntity.AttachCreateInfo(context);
         return(service.InsertAsync(organizeEntity));
     }
 }
Exemplo n.º 2
0
 public Task <int> Save(OrganizeEntity 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));
     }
 }