Пример #1
0
 private int?Update <T>(T entity, IAdapter <T> adapter) where T : IDalEntity
 {
     if (entity.IsMarkForDeletion)
     {
         adapter.Delete(entity.Id);
     }
     else if (entity.IsDirty && entity.Id == null)
     {
         var id = adapter.Insert(entity);
         return(id);
     }
     else if (entity.IsDirty)
     {
         adapter.Update(entity);
     }
     return(entity.Id);
 }
Пример #2
0
 public async Task <HttpStatusCode> Delete(string skillId)
 {
     return(await _adapter.Delete(skillId));
 }