How to Use EF Core Well in a Production Environment
This is the second article in a series on using EF Core for database migrations.
This is the second article in a series on using EF Core for database migrations.
Yesterday, the friends in the '.NET Big Cow Road' group discussed the topic of implementing the repository pattern using EF Core. I remembered an article written by a foreign expert that I had read before, and I think it's very valuable for reference.
When using EF Core, many times you need to know what SQL statements EF Core actually executes.
Several suggestions
The detailed explanation of what Dapper is is omitted here; this article only provides a brief explanation of using Dapper in .NET Core. The code presented is mainly for examples, serving as an introduction. Developers can extend and adjust according to their own needs.
The framework `Zack.EFCore.Batch` for `batch` performing `update`, `delete`, and `insert` operations in `EF Core` has released a new version. The new version adds support for `.NET 6`, supports `ValueConverter` during batch data insertion, and completely solves the `"The count of columns should be even" exception that occurs when two column expressions are equivalent during data update`.
Entities in EntityFramework Core do not directly support operations on enum types, which brings us a lot of trouble during development.
Many-to-many relationships are not as simple as other relationships. In this article, I will show you how to create many-to-many relationships and how to use them in EF Core.