Since version 3 Entity Framework Core has supported Interceptors. The interception API allows developers to easily intercept and examine and … Continue reading Using Entity Framework Core Interceptors to log SQL queries
I prefer to use DB first approach with Entity framework as many do. In this scenario when the underlying DB … Continue reading Run Scaffold DBContext without overwriting custom code in Entity Framework core.
Using a non sequential GUID in either a clustered or non clustered index is not ideal from a performance point … Continue reading Generating sequential GUIDs which sort correctly in SQL Server in .net
When using Entity Framework, in an effort to track down bugs or performance problems, it’s very handy to see what … Continue reading Viewing SQL generated by Entity Framework when querying or calling SaveChanges()
You may see this exception when doing a DbContext.SaveChanges() call. You then may go drilling into the exception details to … Continue reading Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details
If you’re in an enterprise environment some form of auditing is likely to be required so you can track who … Continue reading Passing userId to SQL Server delete trigger from entity framework
We had a new contractor start the other day in work and he brought to my attention the ability to … Continue reading Improving performance of read only selects in entity framework by turning off tracking with AsNoTracking method
If you want to have a client-wins or last in wins approach to concurrency management you don’t have to do anything, … Continue reading Using Optimistic concurrency with Entity Framework over SQL Server