public async Task <IActionResult> PutSleepingTime(int id, SleepingTime sleepingTime) { if (id != sleepingTime.Id) { return(BadRequest()); } _context.Entry(sleepingTime).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SleepingTimeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDailyRoutine(int id, DailyRoutine dailyRoutine) { if (id != dailyRoutine.Id) { return(BadRequest()); } _context.Entry(dailyRoutine).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DailyRoutineExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutXbrainUser(int id, XbrainUser xbrainUser) { if (id != xbrainUser.Id) { return(BadRequest()); } _context.Entry(xbrainUser).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!XbrainUserExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }