Are there any cause methods in ASP.NET MVC controllers that do not appear to be XML documented?

I am a big fan of XML documentation in .NET.

However, I can honestly say that I have never seen a textbook or project where, for example, we had such markup:

/// <summary>
/// dummy text
/// </summary>
/// <returns>blah</returns>
public ActionResult LogOff() {
    FormsService.SignOut();

    return RedirectToAction("Index", "Home");
}

Instead:

// **************************************
// URL: /Account/LogOff
// **************************************

public ActionResult LogOff() {
    FormsService.SignOut();

    return RedirectToAction("Index", "Home");
}

Is there any special reason for this? Am I the only one who wants to document my controller methods?

EDIT 1:

And although most controller methods seem simple, what about the cases described in this question: MVC: How to work with objects with many child objects? ?

+3
source share
2 answers

XML , API , . , , .

, , , HttpPost HttpGet.

, API?

+8

, , :

/// <summary>
/// Controller for viewing and updating the jobs list.
/// </summary>
public class JobsController : Controller
{
    /// <summary>
    /// Displays a list of all jobs for a given site.
    /// </summary>
    /// <param name="siteId">Id of the site to view jobs for.</param>
    public ActionResult Index(string siteId);

    /// <summary>
    /// Displays a detail view of a single job.
    /// </summary>
    /// <param name="id">Id of the job to view.</param> 
    public ActionResult Detail(string id);
}

, xml , , , , /, - . , , , .

, - , , , , , , .

/ :

, , , , XML . - , :

  • , // .
  • , ( , ).

, , , - .

, - , JSON . XML , , ( , ). , , - , - , , .

, ( , ).

+2

Source: https://habr.com/ru/post/1794591/


All Articles