예제 #1
0
        public ActionResult Create()
        {
            var model = new BillViewModel();

            model.BillingItems = new List <BillingItemViewModel> {
                new BillingItemViewModel()
            };
            model.Customers             = _billingContext.GetAllCustomer().Select(Map).ToList();
            model.BillingItems[0].Items = _billingContext.GetActiveItems().Select(Map).ToList();
            return(View(model));
        }
예제 #2
0
        public IActionResult Index()
        {
            var items = _billingContext.GetAllCustomer().Select(Map).ToList();

            return(View("Index", items));
        }