Why does T4MVC generate controller default constructor? Just curious.
+1
A:
This thread has some discussion on this. In short, I had attempted to remove it, but it didn't' achieve that much so I didn't make the change. But for most people, this is a non-issue. Hopefully, that is the case for you as well, since you say you're 'just curious' :)
As for why it needs a default ctor, it has to do with the way T4MVC generates derived controller classes that it needs to be able to instantiate. For this to work, it needs to be able to properly construct the base class, which is not easy when it doesn't have a default ctor.
David Ebbo
2010-09-16 18:24:09
But what did motivate you to implement this feature initially?
Idsa
2010-09-16 18:57:24
Extended answer to give some details on this.
David Ebbo
2010-09-17 20:34:35
Thank you! Now it's clear :)
Idsa
2010-09-18 03:29:01