Provides a few libraries to decouple business modules from concrete SQL database engines:
- Fonlow.EntityFrameworkCore.Abstract
- Fonlow.EntityFrameworkCore.MySql
- Fonlow.EntityFrameworkCore.Sqlite
Therefore, through altering a connection string in the app settings, your app can switch to another DB engine during deployment.
Hints:
- It shoudl be quick and easy for you to write Fonlow.EntityFrameworkCore.MyFavoriteDbEngine for MS SQL or Oracle etc.
Provides a few libraries to create a database of ASP.NET Core Identity with a concreate database engine:
- Fonlow.AspNetCore.Identity
- Fonlow.AuthDbCreator
- Fonlow.WebApp.Accounts
Please read the readme.md file of each library.
Hints:
- Even if you don't use ASP.NET Core Identity for authentication, but something like Okta, Auth0 or Azure AD / MS Entra ID, doupling main business modules from the authentication implementation is benefitical to CI and business, and having a locally hosted ASP.NET Core Identity implementation makes integration tests fast as explained below.
- Microsoft has provided similar classes out of the box from libraries or scarfolding codes of ASP.NET MVC, however, using string for ID, while these libraries use GUID.
===Article later ===========
Microsoft .NET Framework and .NET Core have provided architectural design for application programmer to decouple the concrete implementation of authentication from the main business logic codes, through a class named AuthorizeAttribute in variety of its development frameworks:
- System.WebHttp.AuthorizeAttribute of .NET Framework
- System.Web.Mvc.AuthorizeAttribute of .NET Framework
- ...
- Microsoft.AspNetCore.Authorization.AuthorizeAttribute
In addition to the architectural design, such naming convention through name "AthorizeAttribute" makes code migrations and switching authentication mechanism even easier.
Remarks:
The decoupling in WCF goes through different approach, as described on https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/authentication-in-wcf