Пример #1
0
        public IActionResult Create()
        {
            TeaOrderViewModel model = new TeaOrderViewModel();

            model.CustomerSelections = _service.GetCustomers().Select(c => new SelectListItem
            {
                Value = c.Id.ToString(),
                Text  = c.Name
            }).ToList();
            model.Teas = _orderService.GetTeas().Select(t => new SelectListItem {
                Value = t.Id.ToString(), Text = t.Name
            }).ToList();

            return(View(model));
        }
Пример #2
0
        public IActionResult Index()
        {
            var lisCustomer = _service.GetCustomers();

            return(View(lisCustomer));
        }