public float CowAverage(Cow cow, DateTime begin, DateTime end) { return((from m in MilkingsForPeriod(begin, end) where m.Cow == cow select m.Amount).Average()); }
public void CustomEvent(Cow cow, DateTime date, string id) { _container.Set(new CustomCowEvent { Cow = cow, Date = date, Id = id }); }
public void Track(Cow cow) { _container.Set(cow); }
public void Milked(Cow cow, DateTime date, float amount) { _container.Set(new Milking { Cow = cow, Date = date, Amount = amount }); }
public float OptimizedCowTotal(Cow cow, DateTime begin, DateTime end) { return((from Milking m in OptimizedMilkings(cow, begin, end) select m.Amount).Sum()); }