Last active
August 31, 2017 07:51
-
-
Save valeriob/5676bef2fe41c7c47f7c48212de4148a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits R4Mvc.R4MvcBasedRazorPage<TModel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>Index</h2> | |
<div> | |
Test Url DI :@Url.Action(MVCTest.Dummy) | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class R4MvcBasedRazorPage<TModel> : RazorPage<TModel> | |
{ | |
[RazorInject] | |
public MVCHelperBase MVCTest { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddR4Mvc(/* Hook to add model unbinders */); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Extensons{ | |
public static void AddR4mvc(IServiceCollection services){ | |
services.AddTransient<R4Mvc.MVCHelperBase>(); | |
// find a way to replace extend RazorPage<TModel> | |
// maybe with RazorViewEngineOptions.CompilationCallback | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment