// GET: Dashboard public IActionResult Index() { var model = new DashboardViewModel(); var statistics = _queryDispatcher.Execute(new StatisticsByTimeSliceQuery(_timeSliceCreationService.CreateTimeSlices(), TimeSliceType.All)); model.Cards = _statisticCardConverterRepository.ConvertStatistic(statistics.FirstOrDefault(s => s.TimeSlice.Type.Equals(TimeSliceType.All))); model.OpenPositions = Mapper.Map <OpenPositionsViewModel>(_transactionCalculationService.CalculateOpenPositions()); return(View(model)); }
// GET: Dashboard public ActionResult Index() { var model = new DashboardViewModel(); var statistic = _queryDispatcher.Execute(new StatisticsByTimeSliceQuery(_timeSliceCreationService.CreateTimeSlices())); model.Cards = _statisticCardConverterRepository.ConvertStatistic(statistic); //NOTE: Cache disabled because of IQuotation overrides Equals and only date is taken into account model.OpenPositions = Mapper.Map <OpenPositionsViewModel>(_transactionCalculationService.CalculateOpenPositions(), o => o.DisableCache = true); return(View(model)); }