It’s introduced in EF Core 2.2. This feature helps correlate LINQ queries in code with generated SQL queries captured in logs. You annotate a LINQ query using the new TagWith() method.
What is query tags in EF Core?
It’s introduced in EF Core 2.2. This feature helps correlate LINQ queries in code with generated SQL queries captured in logs. You annotate a LINQ query using the new `TagWith()_` method._
var publishedBlogPosts = dbContext.BlogPosts .Where(b => b.PublishedAt != null) .TagWith("Getting published blog posts") .ToList();
When EF generates the SQL with
TagWith method, it also includes the tag as a comment in the query; as a result, debugging and profiling queries might be easier.
-- Getting published blog posts SELECT [b].[BlogPostId], [b].[Content], [b].[PublishedAt], [b].[Title] FROM [BlogPosts] AS [b] WHERE [b].[PublishedAt] IS NOT NULL
Entity Framework Core EF Core 5.0 gets closer to a final release. RC2 is now available with bug fixes and a go-live license.
We will learn about entity framework core in details i.e. what, how & why and see how to use it in ASP.NET Core Web API to implement CRUD operations. Though here we will be using entity framework in ASP.NET Core this can be implemented even in .NET Framework for your data persistence.
Today, the Entity Framework Core team announces the eighth and final preview release of EF Core 5.0. The next release will be a release candidate (RC). This release includes table-per-type (TPT) mapping, table-valued functions, SQLite table rebuilds for migrations and much more.
Let’s make relationships between entities with Entity Framework Core easy with Code First approach
The preview 7 release of EF Core 5.0 is now available, with a new data context factory, improvements to Cosmos DB support, and much more. Today, the Entity Framework Core team announces the seventh preview release of EF Core 5.0. This release includes a factory to create DbContext instances, the ability to reset DbContext state, Cosmos DB improvements including enhanced support for configuration options and partition keys, and much more.