.NET - May 2021

Using interceptors with dependency injection in Entity Framework Core

EF Core interceptors via dependency injection in ASP.NET 5
 
0
I while ago I wrote an article on how to Access multiple databases from the same DbContext in EF Core which relies on interceptors to mutate the SQL query diring execution. This code works just fine and it updates the command prior to it's execution, but it lacks in option to inject registered services to it's constructor as i used new keyword to initialize class instances. Adding interceptor without dependency injection ...read more

Implementing soft delete in EF Core using triggers

Entity soft delete implementation in EF Core
 
0
Implementation approach for soft delete is more-less straight forward thing. Instead of deleting data record, you introduce a flag which will mark the record as deleted and you can simply filter out on it and not show the data with the flag set. This way you do not loose data, but you restrict the end user to see it. This way of "deleting" data records, or better said marking them as deleted applies for certain types of applications, but sometime this requirement may come later as a new feature while the actual delete is in place...read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more

PowerShell

read more