public CommessaDto ReadCommessa(FatturaAcquistoDto fatturaAcquisto) { try { if (fatturaAcquisto != null) { var fornitoreId = fatturaAcquisto.FornitoreId; var viewModel = new Fornitore.FornitoreViewModel(); var fornitore = (FornitoreDto)viewModel.Read(fornitoreId); if (fornitore != null) { var commessa = fornitore.Commessa; return(commessa); } } } catch (Exception ex) { UtilityError.Write(ex); } return(null); }