Skip to content

Code Kata with ASP.NET Core (practices, explorations, experiments, tests or just playing with aspnetcore)

License

Notifications You must be signed in to change notification settings

fernandezja/aspnetcore-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aspnetcore-experiments

Code Kata with ASP.NET Core (practicing, exploring, experimenting, testing and playing)

Example Description
ViewLocationExpander Add multiple location for our views. Add locations to the razor engine to search the views (views, components, etc.) using / expanding the folders where the resource is searched. Simple example of the IViewLocationExpanderinterface by adding one or more new search paths.
ViewAddPhysicalExternalFolder Add physical folders (outside the assembly execute folder) where the razor view engine can search (views, components, etc). Using MvcRazorRuntimeCompilationOptions add FileProviders of the type PhysicalFileProvider
DynamicRouteValueTransformer Using dynamic routing. Simple example map route dynamic to controller/action. The handler StarwarsDynamicRouteValueTransformer, i wrote provide route from data repositories (is a memory list into this example), use async method Translate (with parameters HttpContext, RouteValueDictionary) and translated into "again" route values dictionary as return. IMPORTANT: Not change route pattern, not redirect... but process the request (add o change value route)
ApplicationPart Using Microsoft.AspNetCore.Mvc.ApplicationParts to discover and load ASP.NET Core features (controllers, view components, etc.) from SharedComponent Library. Views are shared by embedding them.

About

Code Kata with ASP.NET Core (practices, explorations, experiments, tests or just playing with aspnetcore)

Topics

Resources

License

Stars

Watchers

Forks