Extending The Razor View Engine With View Location Expanders

In a previous post, I dived into view results, and how the razor view engine executes a razor view. Part of the post discussed a feature called view location expanders. An expander does what its name describes. It expands on locating a view within your application, that is, a way to change how your .cshtml files are located. View Localisation A good example of a view location expander, is the built-in LanguageViewLocationExpander....

October 24, 2017 · 3 min · 504 words · Jack Histon

ASP.NET Core 2.0 - Repository Overview: Action Results

In This Series ASP.NET Core MVC - Repository Overview: Model Binding ASP.NET MVC Core - Repository Overview: Value Providers ASP.NET Core 2.0 - Repository Overview: Action Discovery ASP.NET Core 2.0 - Repository Overview: Action Selection ASP.NET Core 2.0 - Repository Overview: Razor Pages ASP.NET Core 2.0 - Repository Overview: Action Results Contents Introduction What is the View Result Returning a view result Executing a view result The Executor Finding and Compiling your View View Location Expanders View Locator Cache Generating an IRazorView Cache Invalidation Rendering the Razor Page Creating a Custom Action Result Summary Introduction This series tries to explain the underlying mechanisms of ASP....

October 8, 2017 · 7 min · 1432 words · Jack Histon

ASP.NET Core 2.0 - Repository Overview: Razor Pages

Previously in this Series ASP.NET Core MVC - Repository Overview: Model Binding ASP.NET MVC Core - Repository Overview: Value Providers ASP.NET Core 2.0 - Repository Overview: Action Discovery ASP.NET Core 2.0 - Repository Overview: Action Selection Contents Introduction What is Razor Pages? How to setup Razor Pages Creating your first Razor Page The RazorProjectPageRouteModelProvider Class Razor Pages and Forms The code-behind file The Razor Page Application Model Dealing with Multiple Handlers Getting rid of the handler query parameter Summary Introduction This article is the fifth in a series I’m dedicating to reviewing the code and design of the ASP....

September 24, 2017 · 15 min · 3187 words · Jack Histon

ASP.NET Core 2.0 - Repository Overview: Action Selection

Previously in this Series ASP.NET Core MVC - Repository Overview: Model Binding ASP.NET MVC Core - Repository Overview: Value Providers ASP.NET Core 2.0 - Repository Overview: Action Discovery Contents Introduction The ActionSelector Class Dependencies The Route Value Cache Conventional Routing A Note on Cache Efficiency Attribute Routing Attribute Routing with Route Templates Selecting the Best Candidate Evaluating the Constraints Summary Introduction This article is the fourth in a series I’m dedicating to reviewing the code and design of the ASP....

September 9, 2017 · 8 min · 1625 words · Jack Histon

ASP.NET Core 2.0 - Repository Overview: Action Discovery

Previously in this Series ASP.NET Core MVC - Repository Overview: Model Binding ASP.NET MVC Core - Repository Overview: Value Providers Contents Introduction Registering Actions Finding Controller Actions The Controller Feature Provider The Default Application Model Provider Customising Controller Action Discovery Finding Razor Pages The Razor Project PageRouteModel Provider The Compiled PageRouteModel Provider Razor Pages Route Template Summary Introduction This article is the third in a series I’m dedicating to reviewing the code and design of the ASP....

September 2, 2017 · 8 min · 1588 words · Jack Histon