I looked through a lot of the code that is generated by the tool and traced the problem all the way to the
MyController.generated.cs
file:public class ActionNamesClass { public readonly string Index = "Index"; public readonly string Edit = "Edit"; public readonly string Create = "Create"; }
Great now I have to edit the way the code is generated... or do I?
Solution
Turns out David Ebbo has thought of everything! There is a setting in theT4MVC.settings.t4
file specifically for that, which I just need to set to true:// If true, use lower case tokens in routes for the area, controller and action names const bool UseLowercaseRoutes = true;
Now when I look at the generated code in my
MyController.generated.cs
file I can see:public class ActionNamesClass { public readonly string Index = ("Index").ToLowerInvariant(); public readonly string Edit = ("Edit").ToLowerInvariant(); public readonly string Create = ("Create").ToLowerInvariant(); }
Lovely.
Great Tip man, Thanks =D
ReplyDeleteLatest sports news headlines from India and world. Check out today's most recent & up-to-date news coverage, videos & photos at thesportsrumour.com
ReplyDeletesports news
Great Article
ReplyDeleteCloud Computing Projects
Networking Projects
Final Year
Projects for CSE
JavaScript Training in Chennai
JavaScript
Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals,
Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer.
Angular Training