سؤال

Let's say I have this action method in my ApplicationController

public ActionResult MyActionMethodName()
{
    ...
}

I want this (and all methods that doesn't have a specific route) method's route to be /application/my-action-method-name without manually specifying it. Some special route or package that can convert action methods names in PascalCase to dashed routes.

Is there something like that?

هل كانت مفيدة؟

المحلول

I found this project which is a NuGet package that will convert all action method names to lowercased-dashed-routes.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top