public ActionResult DeleteMember(int id) { var memberModel = _repository.GetFamilyMemberById(id); if (memberModel == null) { return(NotFound()); } _repository.DeleteMember(memberModel); _repository.SaveChanges(); return(NoContent()); }