What's the primary difference between conventional routing and attribute routing in ASP.NET Core MVC?
- Conventional routing uses route templates defined in the "Startup.cs" file, while attribute routing defines routes using attributes directly on controller actions or methods.
- Conventional routing is for HTTP GET requests, while attribute routing is for HTTP POST requests.
- Conventional routing is more efficient, while attribute routing is more flexible.
- Conventional routing is only suitable for RESTful APIs, while attribute routing is for web applications.
The primary difference between conventional routing and attribute routing in ASP.NET Core MVC is that conventional routing uses route templates defined in the "Startup.cs" file, while attribute routing defines routes using attributes directly on controller actions or methods. Conventional routing is configuration-based, while attribute routing is declarative and provides more flexibility in defining routes.
Loading...
Related Quiz
- You've heard about "middleware" in ASP.NET Core and learned that there's one for serving static content. What does this middleware help your web application do?
- Which of the following best describes ASP.NET Core?
- If you want to serve static files in ASP.NET Core, you need to use the _______ middleware.
- In the context of an ASP.NET Core project, which of the following describes the appsettings.json file?
- What is the primary purpose of the "Startup.cs" file in an ASP.NET Core project?