.NET Core Tutorial: Using the ServiceCollection Extension Pattern II: Pass options using the Options Pattern
In a previous post I demonstrated how to use to ServiceCollection Extension Pattern and how this prevents a bloated ConfigureServices() pipeline. In this follow up you will learn how to pass additional information to your implementation. Consider the following extension method that adds your project containing some services: As seen in the previous post, we … Continue reading .NET Core Tutorial: Using the ServiceCollection Extension Pattern II: Pass options using the Options Pattern →
If you have worked on applications (in .NET Core) you should know how Dependency Injection (DI) is supported and is applied for your services. This is straight forward and not so hard at all. Just add them to the IServiceCollection in the ConfigureServices() pipeline in the startup.cs file. Considering a N-Tier architrecture, where our Startup.cs … Continue reading .NET Core Tutorial: Using the ServiceCollection Extension Pattern →
When you run the custom tool of a T4 Template, it generates code in a child node of that template. On StackOverflow I have seen a a lot of devs asking how to write to separate files, or even to a different folder. This is actually easy to achieve, and there are multiple possible solutions. … Continue reading Tutorial: Generate seperate files from a T4 Template →
Several developers complain about the lack of a proper T4 editor experience, as everything is just shown as plain text. See my other T4 tutorials to see the regular T4 text files in the header image. I created a Visual Studio extension called T4Editor that adds colors to different blocks in you code. You can … Continue reading T4Editor VS2019 Extension: Syntax highlighting for T4 Templates →
When working with T4 templates in Visual Studio, you have to manually execute the custom for it to trigger the code generation. I used AutoT4 in the past (a VS2012 extension) to execute template on build time but this extension is not supported in the latest version(s) of Visual Studio. T4Executer is open for contributions … Continue reading T4Executer VS2019 Extension →
This is not so hard to do actually. It ensures your transformations are executed when you build your solution, when in some cases you did not click ‘Build > Transform all T4 Templates’ when changes are made to your .tt files. If one of your projects uses T4 to generate code, and you want it … Continue reading T4 Tutorial: Execute templates at build time →
Something went wrong. Please refresh the page and/or try again.