public async Task <long> Save(ReaperAccount entity) { _context.Entry(entity).State = entity.Id > 0 ? EntityState.Modified : EntityState.Added; await _context.SaveChangesAsync(); return(entity.Id); }
public async Task <long> Delete(long id) { ReaperAccount reaperAccount = await GetById(id); _context.ReaperAccounts.Remove(reaperAccount); await _context.SaveChangesAsync(); return(id); }