public async Task <IActionResult> UpdateClub(UpdateClubModel club) { var updateClub = await _clubService.Update(club); if (updateClub == null) { return(new NoContentResult()); } return(new OkObjectResult(updateClub)); }
public async Task <Club> Update(UpdateClubModel updateClub) { var club = await _clubRepository.GetByIdAsync(updateClub.Id); if (club == null) { return(null); } club = UpdateClubModel.ToClub(updateClub, club); return(await _clubRepository.UpdateAndSaveAsync(club)); }