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)); }
public IActionResult Index() { var items = _billingContext.GetAllCustomer().Select(Map).ToList(); return(View("Index", items)); }