public IActionResult PutFamily(int id, Family family) { if (id != family.Id) { return(BadRequest()); } _familyRepository.Edit(family); try { _familyRepository.Save(); } catch (DbUpdateConcurrencyException) { if (!FamilyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public DataMessage Edit(EditFamily model) { DataMessage message; message = familyRepository.Edit(model); return(message); }