Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

MVC Vs WebAPI routing difference #5762

@avikenjale

Description

@avikenjale

This issue might be raised earlier hence can be duplicate.

When we configure ASP.NET core app (MVC) we define and map routes under Startup.cs - Configure - app.useMvc(). And this works perfectly.
However, when WebAPI comes into picture, why we need to specify [Route("api/[controller]") specifically? In other way, webAPI only works with attribute routing?

Why can't Configure method handles this route configuration? Which was good option in earlier MVC/WebAPI (not core).

Am I missing anything?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions