mirror of
https://github.com/rudollee/LearningMVC.git
synced 2025-06-07 07:56:14 +00:00
24 lines
414 B
C#
24 lines
414 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace EssentialTools.Models
|
|
{
|
|
public class ShoppingCart
|
|
{
|
|
private IValueCalculator calc;
|
|
|
|
public ShoppingCart(IValueCalculator calcParam)
|
|
{
|
|
calc = calcParam;
|
|
}
|
|
|
|
public IEnumerable<Product> Products { get; set; }
|
|
|
|
public decimal CalculatorProdutTotal()
|
|
{
|
|
return calc.ValueProducts(Products);
|
|
}
|
|
}
|
|
} |