public async Task <IActionResult> CreateAssociation(AssociationCreateRequest request) { //Creazione modello richiesto da admin var model = new Association { Name = request.Name, Classifications = request.Classifications, Divisions = request.Divisions, Categories = request.Categories, FirstPenaltyLabel = request.FirstPenaltyLabel, HitOnNonThreatPointDown = request.HitOnNonThreatPointDown, FirstProceduralPointDown = request.FirstProceduralPointDown, SecondPenaltyLabel = request.SecondPenaltyLabel, SecondProceduralPointDown = request.SecondProceduralPointDown, ThirdPenaltyLabel = request.ThirdPenaltyLabel, ThirdProceduralPointDown = request.ThirdProceduralPointDown, SoRoles = request.SoRoles }; //Invocazione del service layer var validations = await BasicLayer.CreateAssociation(model, PlatformUtils.GetIdentityUserId(User)); if (validations.Count > 0) { return(BadRequest(validations)); } //Return contract return(Ok(ContractUtils.GenerateContract(model))); }