public Task <IActionResult> GetMatch(MatchRequest request) { var entity = BasicLayer.GetMatch(request.MatchId); //verifico validità dell'entità if (entity == null) { return(Task.FromResult <IActionResult>(NotFound())); } var groups = BasicLayer.FetchAllGroupsWithShootersByMatchId(entity.Id); var stages = BasicLayer.FetchAllStagesByMatchId(entity.Id); var association = BasicLayer.GetAssociation(entity.AssociationId); var place = BasicLayer.GetPlace(entity.PlaceId); //Serializzazione e conferma return(Reply(ContractUtils.GenerateContract(entity, association, place, groups, stages))); }