public bool Edit(ClubEdit edit) { var isNew = edit.Id == 0; if (isNew) { var club = new Club() { Name = edit.Name }; _clubRepository.Add(club); } else { var club = _clubRepository.GetAll().First(c => c.Id == edit.Id); club.Name = edit.Name; } _clubRepository.Save(); return(true); }