public async Task <User> Update(int id, object obj) { _gendeiContext.Entry(obj).State = EntityState.Modified; await _gendeiContext.SaveChangesAsync(); return(await Get(id)); }
public async Task <City> Update(int id, object obj) { _gendeiContext.Entry(obj).State = EntityState.Modified; try { await _gendeiContext.SaveChangesAsync(); } catch { throw; } return(await Get(id)); }