Working with databases means writing queries, getting results, measuring performance, and then optimizing. The cycle never ends. Luckily, for Entity Framework Core 5 (EF Core) users, we have a few options for optimizing our queries. With an IDE like JetBrains Rider, we have tools to understand the benefits we get from our code changes.
This post will look at an extensibility point that many folks will appreciate, especially when dealing with C# objects that we can manage with identifiers. Let’s dive right into Value Converters for EF Core 5.
本文我们来探讨下映射动态模型的几种方式，相信一部分童鞋项目有这样的需求，比如每天/每小时等生成一张表，此种动态模型映射非常常见，经我摸索，这里给出每一步详细思路，希望能帮助到没有任何头绪的童鞋，本文以.NET Core 3.1控制台，同时以SQL Server数据库作为示例演示（其他数据库同理照搬），由于会用到内置APi，因版本不同可能比如构造函数需略微进行调整即可。注：虽为示例代码，但我将其作为实际项目皆已进行封装，基本完全通用。本文略长，请耐心。
MS SQL Server provides functionality to quickly insert large amounts of data. It is called Bulk Copy and is performed by SqlBulkCopy class. I already compared how fast is it compared to EF Core 5 in this post: https://www.michalbialecki.com/2020/05/03/entity-framework-core-5-vs-sqlbulkcopy-2/, but this time I want to check something different – linq2db library.
Today we are excited to share with you the plan for Entity Framework Core 6.0. This plan brings together input from many stakeholders and outlines where and how we intend to invest for the Entity Framework (EF Core) 6.0 release. This plan is not set-in-stone and will evolve as we work on the release based on what we learn. This learning includes feedback from people like you, so please let us know what you think!
Whether you are new to EF / EF Core or moving from an earlier version, I’ve been pretty busy creating a number of useful resources for you whether you prefer to learn by video, reading or listening!
For reasons beyond the scope of this post, I recently implemented an interface between a front-end web application and a MySQL database to facilitate dynamic filtering against different tables and columns (It's not as bonkers as sounds, model properties must be configured as filterable first!). The project requirements ruled out more conventional solutions like OData, and so I had to implement the bridge myself.
Tests are an integral part of software development. These are separate programs that allow you to check if a piece of the program written by us does exactly what it should. Unit tests are small pieces of code that test individual program elements and in Entity Framework Core 5 it’s surprisingly easy to write them.
In this post, we’ll see how we can get started with EF Core 5. We’ll design a schema for entertainment productions using a code-first approach, migrate an SQLite database to our schema’s current incarnation, seed our database, and run some typical LINQ queries.
使用过 EF Core 大多都会遇到这样一个场景，希望能够并行查询，但是如果使用同一个 DbContext 实例进行并行操作的时候就会遇到一个 InvalidOperationException 的异常，在 EF Core 2.x/3.x 版本中， EF Core DbContext 的生命周期默认是 Scoped，如果要并行查询，需要创建多个 Scope，在子 Scope 中创建 DbContext 来进行操作，EF Core 5 中的 DbContextFactory 可以用来简化这样的操作，且看下文示例
If you're a Microsoft developer using EF Core, you are probably really excited about the new feature in EF Core 5 that makes creating many-to-many relationships super simple! Many-to-many relationships in EF Core 5 work intuitively now, so if you have installed the .NET 5 SDK or Visual Studio 2019 16.9 preview 1 you can test the new feature pretty quickly from a .NET Core Console Application targeting .NET 5. In this EF Core 5 tutorial, I will walk you through the standard sample application of building a many-to-many relationship between blog posts and tags in a SQLite database.
Today, the Entity Framework team is delighted to announce the release of EF Core 5.0. This is a general availability/release to manufacturing (GA/RTM) release that addresses final bugs identified in the previous release candidates and is ready for production. EF Core 5.0 is released simultaneously with .NET 5.0.
Entity Framework Core 5.0 will soon be released in conjunction with .NET 5. The release is a major milestone in the long history of Entity Framework that began before version 1.0 was shipped with .NET Framework 3.5 Service Pack 1 in 2008. EF Core 5.0 is cross-platform and supports all of the most popular relational databases. It also provides a consistent API to interface with the popular NoSQL Azure Cosmos DB database. EF Core 5.0 includes scores of new features ranging from “many-to-many” and “table-per-type” to an updated migrations experience. The team is currently focused on bug fixes, updates to documentation, and planning for the next release.
Today, the Entity Framework Core team announces the second release candidate (RC2) of EF Core 5.0. This is a feature complete release candidate of EF Core 5.0 and ships with a "go live" license. You are supported using it in production. This is a great opportunity to start using EF Core 5.0 early while there is still time to fix remaining issues. We're looking for reports of any remaining critical bugs that should be fixed before the final release.
Recently I wrote a post about executing raw SQL scripts in Entity Framework Core 5: Executing raw SQL with Entity Framework Core 5. One of the readers noticed that I did a big mistake when passing parameters. Let’s take a closed look.
Today, the Entity Framework Core team announces the first release candidate (RC1) of EF Core 5.0. This is a feature complete release candidate of EF Core 5.0 and ships with a "go live" license. You are supported using it in production. This is a great opportunity to start using EF Core 5.0 early while there is still time to fix remaining issues. We're looking for reports of any remaining critical bugs that should be fixed before the final release.
Entity Framework Core 5 is an open-source, lightweight, extensible, and a cross-platform ORM. It is easy to apply and it makes database access super simple. However, sometimes working with tables and views is just not enough. How to execute raw SQL script with Entity Framework Core 5? Let’s find out.