Ejemplo 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));
     }
 }
Ejemplo 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));
     }
 }