Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:09:37+00:00 2026-06-13T05:09:37+00:00

Am migrating a WebApi project (from preview version aka WCF WebApi to final release

  • 0

Am migrating a WebApi project (from preview version aka WCF WebApi to final release aka ASP.NET MVC4 WebApi).

In WCF WebApi, URI templates were defined for all services operations, like:

[WebGet(UriTemplate = "{movieGenreId}/movies")]

Bare I mind I have tens of those in the project. How do I translate this to MVC4 WebApi without having to register tens of entries in the Route table?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:09:38+00:00Added an answer on June 13, 2026 at 5:09 am

    You could go with the excellent attribute routing for Web API project:

    • Here is the source on GitHub (both MVC & Web API) – https://github.com/mccalltd/AttributeRouting

    • Here is a short intro to attribute routing in Web API – http://www.strathweb.com/2012/05/attribute-based-routing-in-asp-net-web-api/

    • Here is the Nuget for the attribute routing Web API package – http://nuget.org/packages/AttributeRouting.WebApi/3.1.2

    It should be almost as easy as search and replace to convert UriTemplates to Attribute Routing.

    If you are not willing to include the attribute routing library in your project, unfortunately the only other way is – as you said – registering tens of routes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Migrating a project from ASP.NET 1.1 to ASP.NET 2.0 and I keep hitting this
I am migrating a project that was developed using WebApi Preview 5 (when it
I'm currently migrating my project from Hibernate HBM Mappings to Annotations. Everything was easy
migrating from one django version to the next, usually requires that you read the
after migrating from .NET 3.5 to 4.0 i have a strange problem with a
Migrating asp.net code (VB.net) to use functions and subroutines as parameters. Using MS Server
I'm migrating from JBoss 5.1.0.GA to JBoss 6.0.0-Final and facing following exception during FacesServler
Migrating from textboxe to dropdownlist – Need to send value from a hard-coded dropdownlist
Migrating a legacy application from WebSphere v.6 to WebSphere v.8. The application's web.xml only
After migrating my whole setup from Java 1.5 to 1.6 (J2EE, Tomcat) a couple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.