Π£ Π½Π°Ρ Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΠΏΠΎΡΠΌΠΎΡΡΠ΅ΡΡ Π±Π΅ΡΠΏΠ»Π°ΡΠ½ΠΎ Entity Framework Best Practices - Should EFCore Be Your Data Access of Choice? ΠΈΠ»ΠΈ ΡΠΊΠ°ΡΠ°ΡΡ Π² ΠΌΠ°ΠΊΡΠΈΠΌΠ°Π»ΡΠ½ΠΎΠΌ Π΄ΠΎΡΡΡΠΏΠ½ΠΎΠΌ ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅, Π²ΠΈΠ΄Π΅ΠΎ ΠΊΠΎΡΠΎΡΠΎΠ΅ Π±ΡΠ»ΠΎ Π·Π°Π³ΡΡΠΆΠ΅Π½ΠΎ Π½Π° ΡΡΡΠ±. ΠΠ»Ρ Π·Π°Π³ΡΡΠ·ΠΊΠΈ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Π²Π°ΡΠΈΠ°Π½Ρ ΠΈΠ· ΡΠΎΡΠΌΡ Π½ΠΈΠΆΠ΅:
ΠΡΠ»ΠΈ ΠΊΠ½ΠΎΠΏΠΊΠΈ ΡΠΊΠ°ΡΠΈΠ²Π°Π½ΠΈΡ Π½Π΅
Π·Π°Π³ΡΡΠ·ΠΈΠ»ΠΈΡΡ
ΠΠΠΠΠΠ’Π ΠΠΠΠ‘Π¬ ΠΈΠ»ΠΈ ΠΎΠ±Π½ΠΎΠ²ΠΈΡΠ΅ ΡΡΡΠ°Π½ΠΈΡΡ
ΠΡΠ»ΠΈ Π²ΠΎΠ·Π½ΠΈΠΊΠ°ΡΡ ΠΏΡΠΎΠ±Π»Π΅ΠΌΡ ΡΠΎ ΡΠΊΠ°ΡΠΈΠ²Π°Π½ΠΈΠ΅ΠΌ Π²ΠΈΠ΄Π΅ΠΎ, ΠΏΠΎΠΆΠ°Π»ΡΠΉΡΡΠ° Π½Π°ΠΏΠΈΡΠΈΡΠ΅ Π² ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΡ ΠΏΠΎ Π°Π΄ΡΠ΅ΡΡ Π²Π½ΠΈΠ·Ρ
ΡΡΡΠ°Π½ΠΈΡΡ.
Π‘ΠΏΠ°ΡΠΈΠ±ΠΎ Π·Π° ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ ΡΠ΅ΡΠ²ΠΈΡΠ° ClipSaver.ru
Entity Framework is an amazing set of tooling around data access. With EFCore, that tooling becomes even more powerful. So why is it that I still don't recommend that people use EFCore? In this video, I will walk you through the best practices of Entity Framework and EFCore and point out the pitfalls to avoid. We will discuss where there are problems and what to do to resolve those problems. Mailing List: https://signup.iamtimcorey.com/ Source Code: https://leadmagnets.app/?Resource=EFB... Courses: https://IAmTimCorey.com/courses Blog Post: https://www.iamtimcorey.com/blog/1378... nvarchar(max) performance: https://www.sqlservercentral.com/foru... Downloading SSMS: https://docs.microsoft.com/en-us/sql/... C# Mastercourse: https://iamtimcorey.com/p/c-mastercourse Thanks to Ralfs HBK for the chapters breakdown: 0:00 - Intro 3:11 - Project setup: ASP. NET Core project 4:39 - Project setup: .NET standard library 6:04 - Project setup: Adding data models 11:02 - Project setup: EF Core SQL server NuGet 13:01 - Project setup: Data Access class 15:26 - EF Configuration: Startup.cs 17:43 - EF Configuration: Connection string 22:46 - Migration scripts and concerns 30:05 - Migration script: Down command 31:50 - Migration script: Up command 37:19 - Multiple migrations 38:46 - Model snapshot... 40:10 - Model snapshot: Nvarchar explained 45:14 - Problem: Nvarchar(max): Indexing 46:49 - Problem: Nvarchar(max): performance 50:52 - ... Model snapshot: why nvarchar(max) ... 52:13 - Problem: EF and data access 53:39 - ... Model snapshot 54:58 - Created Data Base overview 57:50 - Data model optimization... 1:00:48 - Problem: Development vs production 1:03:45 - ... Data model optimization 1:05:18 - Possible data loss with new migration for in production app 1:07:40 - The updated migration script overview 1:09:15 - No data rollback 1:10:39 - Data Base update 1:11:45 - Using the EF: data import from JSON file 1:18:34 - Using the XEventProfiler 1:23:57 - Monitoring and filtering SQL server commands from the EF app 1:27:42 - How the EF inserts data: sp_executesql 1:39:11 - EF query 1:46:39 - EF query: efficiency and possible consequences 1:58:34 - EF query: where clause: SQL vs C# 2:10:40 - Recap: best practices covered in this video 2:12:08 - Why use Entity Framework? Supposed benefits 2:20:12 - Benefits of using Dapper 2:25:46 - Summary and concluding remarks