public async Task <User> Update(int id, object obj) { _medicwallContext.Entry(obj).State = EntityState.Modified; try { await _medicwallContext.SaveChangesAsync(); } catch { throw; } return(await Get(id)); }
public object Update(int id, Schedule schedule) { _medicwallContext.Entry(schedule).State = EntityState.Modified; try { _medicwallContext.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Exists(id)) { return(null); } else { throw; } } return(schedule); }