Beispiel #1
0
        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());
        }
Beispiel #2
0
 public IActionResult Index()
 {
     return(View(repository.GetAllProviders()));
 }