#MVC

Extending The Razor View Engine With View Location Expanders

Published at October 24, 2017 ·  3 min read

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....


ASP.NET Core 2.0 - Repository Overview: Action Results

Published at October 8, 2017 ·  9 min read

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....


ASP.NET Core 2.0 - Repository Overview: Razor Pages

Published at September 24, 2017 ·  17 min read

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....


ASP.NET Core 2.0 - Repository Overview: Action Selection

Published at September 9, 2017 ·  10 min read

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....


ASP.NET Core 2.0 - Repository Overview: Action Discovery

Published at September 2, 2017 ·  8 min read

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....