I'm a huge fan of XML documentation in .NET.
However, I can honestly say I've never seen a tutorial or project where, for example, we had markup like this:
/// <summary>
/// dummy text
/// </summary>
/// <returns>blah</returns>
public ActionResult LogOff() {
FormsService.SignOut();
return RedirectToAction("Index", "Home");
}
Instead of:
// **************************************
// URL: /Account/LogOff
// **************************************
public ActionResult LogOff() {
FormsService.SignOut();
return RedirectToAction("Index", "Home");
}
Is there any particular reason for this? Am I the only one who wants to document my Controller's methods?
EDIT 1:
And while most controller methods seem to be simple, how about cases detailed in say this question: MVC: How to work with entities with many child entities? ?
XML documentation is great when the public API needs to be documented for external parties using it. Controllers in my opinion, don't fall into that category.
Also in line with slim controllers, they should be self explanatory as to what they do, especially with attribute metadata such as
HttpPost
andHttpGet
.Do you envisage a third party using your controllers as an API?