public ActionResult <Soep> PutSoep(int id, Soep soep) { if (!_soepenRepository.TryGetSoep(id, out var so)) { return(NotFound()); } so.Naam = soep.Naam; so.Omschrijving = soep.Omschrijving; so.Prijs = soep.Prijs; so.Foto = soep.Foto; so.Hoeveelheid = soep.Hoeveelheid; _soepenRepository.Update(so); _soepenRepository.SaveChanges(); return(NoContent()); }