CHAPTER 6
The Razor Syntax
A man should stand up to his bad luck, to his mistakes, to his conscience and all that sort of thing. Why—what else would you have to fight against?
—Joseph Conrad, “The Shadow Line”
An ASP.NET Core application is typically, but not necessarily, made of controllers, and controller methods typically, but not necessarily, return ViewResult objects as the result of their action. The action result is then processed by the action invoker system component to produce the actual response. If the action result is a ViewResult object, the view engine is kicked off to produce some HTML markup. The view engine is architected to consume templates from a given folder structure and fill it out with some provided data. The way templates ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access