Entity Framework Core guides on query performance, expression reuse, bulk operations, migrations and common pitfalls in .NET data access.
Entity Framework Core is the data access layer in most of the .NET platforms I work on, which means its query behaviour shows up directly in production performance. These articles cover efficient queries, reusable expressions, bulk inserts and the mistakes that are easy to make in code reviews.
In the world of Microsoft SQL Server , views are a powerful tool for simplifying complex data queries. Simple views offer no real performance gain but are often used to implement simple database queries (I still would …
EF Core Migration Bundles are standalone executable files that contain one or more Entity Framework Core migrations and can be applied directly to a database. They are particularly useful for deploying migrations …
With .NET 8, the System.ComponentModel.DataAnnotations Namespace has been revised and some new attributes have been added that have been requested by the community for some time and have only been implemented through …
A database entity represents an identifiable entry, often also things from the real world, which are to be stored and managed in the database. The purpose of database entities is to provide a structured and efficient …
I often see snippets in EF Core code reviews such as the following:
C# dbContext.Users.Where( user => user.Id == id ); The query filter user => user.Id == id is contained directly in the Where - often not just in one …
Unit testing is a type of software testing that is performed on the smallest unit of a software application, called a “unit”. A unit can be a function, method or module that is tested in isolation from other parts of the …
In many software architectures the problem exists that there are methods, which are specified a multiplicity of type-same parameters, whose meaning is however fundamentally different. In principle, this includes all …
In the field of software development, data transformation plays a key role in ensuring that information flows seamlessly between different components and systems. When using Entity Framework (EF Core) , a powerful …
Often there is a situation where you need to load several pieces of information from a database or table at the same time in order to display certain content. The prime example of such a situation is paging:
Using Add or AddAsync in Entity Framework Core can be a little confusing, especially for those new to working with databases and ORMs (Object-Relational Mappers). In this blog post, we’ll take a look at the difference …