public async Task <IActionResult> PutChilderen(long id, Childeren childeren) { if (id != childeren.Id) { return(BadRequest()); } _context.Entry(childeren).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ChilderenExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutNutritions(long id, Nutritions nutritions) { if (id != nutritions.Id) { return(BadRequest()); } _context.Entry(nutritions).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NutritionsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }