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 9229389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:33:34+00:00 2026-06-18T05:33:34+00:00

Ok so a typical route might look like this: {controller}/{action}/{id} The problem is that

  • 0

Ok so a typical route might look like this:

{controller}/{action}/{id}

The problem is that our existing endpoints look like this

{controller}/Somesortofgrouping/{action}

On example of this is our payments controller. We might have the following endpoints:

payment/credit/sale
payment/credit/refund
payment/cash/sale

And the method names would be, respectively:

CreditSale();
CreditRefund();
CashSale();

So rather than having to add every endpoint to the WebApiConfig in order to preserve our convention, is there any way use a template to work with this scenario?

  • 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-18T05:33:36+00:00Added an answer on June 18, 2026 at 5:33 am

    Instead of adding every endpoint to the config, you may consider using the excellent AttributeRouting package and configure routes on the controller/actions itself using attributes.

    Some restrictions apply to Web API (as listed in the documentation) as compared to MVC.

    After having used this library, it’s difficult to imagine going back to maintain a separate configuration of routes.

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

Sidebar

Related Questions

So my typical router log on the Cedar platform looks might look like 2012-03-22T18:26:34+00:00
The typical Python threadpool will have a structure like this one: def run(self): while
We have a typical n-tier java application, and I noticed that our data access
Typical scenario, post to an action that checks ModelState.IsValid and if it is, saves
A typical Rails route like: resource :customer Sets up routes for index, show, etc.
Typical problem - I am trying to save new parent object with nested new
Typical jQuery over-use: $('button').click(function() { alert('Button clicked: ' + $(this).attr('id')); }); Which can be
My typical workflow is that I develop on localhost, but with Google Apps Marketplace
I've been working on a small project using C++ (although this question might be
I'm helping a typical small company that started with a couple of outsourced systems

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.