Visual studio feeds

All Visual Studio blogs in one place


Enter your email address:

Delivered by FeedBurner

Increase your website traffic with



Anti-spam: How many eyes has a typical person?

Follow us on FB


The Enemy of My Friend Writes Bad MVC Controller Actions (Microsoft)

AddThis Social Bookmark Button
Recommendation: Don't use the same action names for get and post.I am always amazed at how bad Microsoft's code examples are.  Code generated using the default templates in Visual Studio is not much better.  To find out, create an empty project (pick your favorite type) and run static code analysis or FxCop and see how many warnings you see.  For some real fun try running StyleCop.  The default templates (and therefore commonly-used standard practices) are also not very good in my opinion.  Consider the following controller code generated using the standard MVC 3 template:
// // GET: /Test/Create public ActionResult Create() { return View(); } // // POST: /Test/Create [HttpPost] public ActionResult Create(FormCollection collection) { ...(Read whole news on source site)

Home : Blog List : Doug Lampe : The Enemy of My Friend Writes Bad MVC Controller Actions (Microsoft)