How to enable attribute routing in ASP .NET MVC?

To enable attribute routing in asp.net mvc we must call a method named “MapMvcAttributeRoutes” in RouteConfig…