public async Task <IActionResult> Index()
        {
            ISearchModel model;

            model = new SearchModelExchange
            {
                Data = await _context.Exchange.ToListAsync()
            };

            return(View(model));
        }
示例#2
0
        public async Task <IActionResult> Index(string variant = null)
        {
            ISearchModel model;

            if (variant != null && variant == "Payments")
            {
                model = new SearchModelPayments
                {
                    Data = await _context.Payment.ToListAsync()
                };
            }
            else
            {
                model = new SearchModelExchange
                {
                    Data = await _context.Exchange.ToListAsync()
                };
            }

            return(View(model));
        }