Using T4MVC in real project
Posted
by artvolk
on Stack Overflow
See other posts from Stack Overflow
or by artvolk
Published on 2010-04-26T06:08:27Z
Indexed on
2010/04/26
6:13 UTC
Read the original article
Hit count: 349
asp.net-mvc
|T4MVC
T4MVC is cool, but I have a couple of issues integrating it in my project, any help is really appriciated:
I've got such warnings for all my actions (I use
SnippetsBaseController
as base class for all my controller classes:Warning 26 'Snippets.Controllers.ErrorController.Actions' hides inherited member 'Snippets.Controllers.Base.SnippetsBaseController.Actions'. Use the new keyword if hiding was intended. C:\projects_crisp-source_crisp\crisp-snippets\Snippets\T4MVC.cs 481 32 Snippets
Is it possible to have strongly typed names of custom Routes, for example, I have route defined like this:
routes.MapRoute( "Feed", "feed/", MVC.Snippets.Rss(), new { controller = "Snippets", action = "Rss" } );
Is it possible to replace:
<%= Url.RouteUrl("Feed") %>
with something like:
<%= Url.RouteUrl(MVC.Routes.Feed) %>
Having strongly typed links to static files is really cool, but I use
<base />
in my pages, so I don't need any URL processing, can I redefineT4MVCHelpers.ProcessVirtualPath
without tweaking theT4MVC.tt
itself?T4MVC always generate links with uppercased controller and action names, for example: /Snippets/Add instead of /snippets/add. Is it possible to generate them lowercase?
© Stack Overflow or respective owner