public IActionResult Add(Customer customer, ServiceProvider serviceProvider) { List <ServiceProvider> NewProvider = new List <ServiceProvider>(); foreach (var provider in repository.GetAllProviders()) { NewProvider.Add(provider); } ViewData["NewProvider"] = NewProvider; List <Customer> NewCustomer = new List <Customer>(); foreach (var cust in repository.GetAllCustomers()) { NewCustomer.Add(cust); } ViewData["NewCustomer"] = NewCustomer; return(View()); }
public IActionResult Index() { return(View(repository.GetAllCustomers())); }