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); }
public async Task <HttpStatusCode> Delete(string skillId) { return(await _adapter.Delete(skillId)); }