예제 #1
0
        public async Task <ActionResult> Index(ExportFilter filter)
        {
            var tuple = await RunTupleResultAsync(() => _exportService.FilteredListAsync(filter));

            var localList = await RunListActionResultAsync <LocalDto>(() => _localService.GetAllListAsync());

            var vm = new ExportViewModel
            {
                Exports        = tuple.Item1,
                NumberOfModels = tuple.Item2,
                Models         = localList.Select(l => new SelectListItem {
                    Value = l.ID.ToString(), Text = l.Name
                }).ToList()
            };

            //var vm
            return(View(vm));
        }