concept html in category .net
appears as: HTML, HTML

This is an excerpt from Manning's book .NET Core in Action.
Listing 7.6. MdlController accepts Markdown text and returns HTML
using System.Collections.Generic; using System.IO; using Microsoft.AspNetCore.Mvc; using Microsoft.DocAsCode.MarkdownLite; namespace MarkdownService { [Route("/")] #1 public class MdlController : Controller { private readonly IMarkdownEngine engine; public MdlController(IMarkdownEngine engine) #2 { this.engine = engine; } [HttpPost] #3 public IActionResult Convert() { var reader = new StreamReader(Request.Body); #4 var markdown = reader.ReadToEnd(); #5 var result = engine.Markup(markdown); return Content(result); #6 } } }