public async Task <IActionResult> PutLog(long id, Log log) { if (id != log.LogId) { return(BadRequest()); } _context.Entry(log).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LogExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> UpdateProfile(int userId, User user) { _context.Entry(user).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }