I am in https://localhost:44311/ and I have those 2 buttons
When I press the Customers button I want to go to https://localhost:44311/Customers and see a list of the current Customers. Similarly https://localhost:44311/Movies and see a list of movies.
For those two I have two Controllers, named MoviesController and CustomersController.
This is my code in CustomersController:
namespace MovieLab.Controllers
{
public class CustomersController : Controller
{
public ActionResult AllCustomers()
{
var customers = new List<Customer>
{
new Customer(){ Name = "Customer 1"},
new Customer(){ Name = "Customer 2" }
};
var customerViewModel = new CustomerViewModel()
{
Customers = customers
};
return View(customerViewModel);
}
}
when I build the code above, my URL looks like this https://localhost:44311/Customers/AllCustomers
shouldn't it be https://localhost:44311/AllCustomers? (I named it AllCustomers so the URL doesn't look like Customers/Customers)
