private static async Task <ForecastComparisonViewModel> GetFullAndPartialViewModelForForecasts(IDataContext context, ForecastFilter filter) { var modelBase = SharedModelBase.GetBaseModel(context); var model = new ForecastComparisonViewModel(modelBase) { PageIndex = filter.PageIndex.HasValue ? filter.PageIndex.Value : 1, PageSize = filter.PageSize.HasValue ? filter.PageSize.Value : Int32.MaxValue, Configuration = context.ConfigurationSettings }; model.Forecasts = await context.Forecast.ListForecasts(filter); return(model); }
private static async Task<ForecastComparisonViewModel> GetFullAndPartialViewModelForForecasts(IDataContext context, ForecastFilter filter) { var modelBase = SharedModelBase.GetBaseModel(context); var model = new ForecastComparisonViewModel(modelBase) { PageIndex = filter.PageIndex.HasValue ? filter.PageIndex.Value : 1, PageSize = filter.PageSize.HasValue ? filter.PageSize.Value : Int32.MaxValue, Configuration = context.ConfigurationSettings }; model.Forecasts = await context.Forecast.ListForecasts(filter); return model; }