refactoring
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Yavsc.Billing;
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
@ -8,5 +9,7 @@ namespace Yavsc.Helpers
|
||||
{
|
||||
public static decimal Addition(this List<IBillItem> items) => items.Aggregate<IBillItem, decimal>(0m, (t, l) => t + l.Count * l.UnitaryCost);
|
||||
|
||||
public static decimal Addition(this List<CommandLine> items) => items.Select(i=>((IBillItem)i)).ToList().Addition();
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user