private void UpdateCampaignByOrder(Campaign orderCampaign) { orderCampaign.TotalSales = _repository.OrderCountByProductCode(orderCampaign.ProductCode); orderCampaign.Turnover = _appTimeRepository.FindActiveAppTime().TurnOver; orderCampaign.AverageItemPrice = _repository.OrderPricesByProductCode(orderCampaign.ProductCode).Average(); _campaignRepository.UpdateCampaign(orderCampaign); }
public AppTime FindAppTime() { return(_appTimeRepository.FindActiveAppTime()); }