} = 10m; // 10m pour preciser qu'il s'agit d'une decimal public decimal GetTotal() { if (!Lignes.Any()) { return(0); } var totalLignes = Lignes.Sum(x => x.Produit.Prix * x.Quantite); // calcul... var fraisPort = totalLignes > 100 ? 0 : 10; // ternaire return(totalLignes + FraisPort); }
private Double FnTotal() { return(Lignes.Sum(e => e.Cout)); }
private Double FnTotal() { return(Lignes.Sum(e => e.Choix * e.Qte)); }