ASP.NET Core
ASP.NET Core Configuration - Reloading, Binding, Injecting
Introduction In the last post, we talked about ASP.NET Core Configuration in general. We saw how is it set up by default from ASP.NET Core. We also talked about sources and that order matters. This time we will talk about mapping configuration to classes.
ASP.NET Core Configuration
Introduction ASP.NET Core configuration differs greatly from standard ASP.NET. Instead of web.config or any other way to set up the configuration we use built-in Configuration framework that comes with ASP.NET Core. It is still key-value pairs collection at the end, but we can obtain those values from various sources. One of default sources is appsettings.json file that comes with all templates. ASP.NET Core 2 templates have configuration already filled with values from appsettings.json file, along with few other sources. However, we can use and combine various sources for configuration settings (values):
Google Analytics Tag Helper Component
Introduction In the last post, we talked about Tag Helper Components and how we can use them to modify existing HTML elements and inject scripts on the fly. I needed Google Analytics scripts in my ASP.NET Core application, so I decided to make a NuGet package for that.
EntityFramework Core - Add an implementation of IDesignTimeDbContextFactory
Problem Your DbContext in a separate project - class library project. You are trying to add new migration and update database, and you are running into this error: Unable to create an object of type ‘CodingBlastDbContext’. Add an implementation of ‘IDesignTimeDbContextFactory’ to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.
ASP.NET Core - Best practices (tips and tricks) - an opinionated approach - Part 2
Introduction In the last post, we talked about tips and tricks, different strategies and approaches to make your code and project easier to maintain. This post is the second part in the series. Avoid HTML Helpers - Use Tag Helpers We should avoid using HTML Helpers in favour of Tag Helpers.
ASP.NET Core - Best practices (tips and tricks) - an opinionated approach - Part 1
Introduction - ASP.NET Core Best Practices This post is about ASP.NET Core best practices post. We will talk about some of the best practices while working with ASP.NET Core. It is a collection of tips and tricks, different strategies and approaches to make your code and project easier to maintain. Also, it will be more pleasant to work on the project. These include the ways to organise the solution, project, pieces of code, tips for writing tests and other things that developers deal with.
ASP.NET Core - ConfigureServices vs Configure
Introduction We already talked about Configuration method inside of Startup when we talked about requests and middleware. In this post, we will see what exactly ConfigureServices and Configure methods are for and how they differ. In ASP.NET Core we have a Startup class where all the configuration is done and processed once the application is starting.
ASP.NET Core SignalR - Simple chat
Update The code has been updated to use latest SignalR - 6 which works with ASP.NET Core 6 Link to GitHub repository: https://github.com/Ibro/SignalRSimpleChat Angular 5 version: here React.js version: here Introduction In the last post, we briefly mentioned what SignalR is all about and talked about the history of the SignalR.
ASP.NET Core SignalR Introduction
Introduction ASP.NET SignalR is a library for ASP.NET developers that simplifies the process of adding real-time web functionality to applications. Real-time web functionality is the ability to have server code push content to connected clients instantly as it becomes available, and not having the server wait for a client to ask for new data.
ASP.NET Core MVC - Custom Tag Helpers
Introduction In on of the previous posts we talked about Tag Helpers, we also talked about caching Tag Helpers and form Tag Helpers. By creating our custom Tag Helpers, we have an ability to extend existing HTML elements or create our custom HTML elements.