mirror of
https://github.com/rudollee/LearningMVC.git
synced 2025-06-07 16:06:21 +00:00
15 lines
291 B
C#
15 lines
291 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace EssentialTools.Models
|
|
{
|
|
public class LinqValueCalculator : IValueCalculator
|
|
{
|
|
public decimal ValueProducts(IEnumerable<Product> products)
|
|
{
|
|
return products.Sum(p => p.Price);
|
|
}
|
|
}
|
|
} |