Skip to content
0:00 / 0:00

#entityframeworkcore#efcore#dapper

Entity Framework Best Practices - Should EFCore Be Your Data Access of Choice?

IAmTimCorey

441K subscribers • 15 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Tim Corey
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

861K views6 years ago2 recommendations

Databases and dataSoftware designDatabase internalsC# and .NETDesign patterns

Tim Corey discusses Entity Framework Core best practices, common pitfalls, and compares its performance and utility with Dapper.

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: signup.iamtimcorey.com/ Source Code: DevForge.com/downloads/?code=EFBestPractices Courses: DevForge.com/courses Blog Post: DevForge.com/blog/137806/entity-framework nvarchar(max) performance: sqlservercentral.com/forums/topic/nvarchar4000-and-performan… Downloading SSMS: docs.microsoft.com/en-us/sql/ssms/download-sql-server-manage… C# Mastercourse: DevForge.com/p/c-mastercourse Thanks to Ralfs HBK for the chapters breakdown: - Intro - Project setup: ASP. NET Core project - Project setup: .NET standard library - Project setup: Adding data models - Project setup: EF Core SQL server NuGet - Project setup: Data Access class - EF Configuration: Startup.cs - EF Configuration: Connection string - Migration scripts and concerns - Migration script: Down command - Migration script: Up command - Multiple migrations - Model snapshot... - Model snapshot: Nvarchar explained - Problem: Nvarchar(max): Indexing - Problem: Nvarchar(max): performance - ... Model snapshot: why nvarchar(max) ... - Problem: EF and data access - ... Model snapshot - Created Data Base overview - Data model optimization... - Problem: Development vs production - ... Data model optimization - Possible data loss with new migration for in production app - The updated migration script overview - No data rollback - Data Base update - Using the EF: data import from JSON file - Using the XEventProfiler - Monitoring and filtering SQL server commands from the EF app - How the EF inserts data: sp_executesql - EF query - EF query: efficiency and possible consequences - EF query: where clause: SQL vs C# - Recap: best practices covered in this video - Why use Entity Framework? Supposed benefits - Benefits of using Dapper - Summary and concluding remarks

Why it's here

2 people recommend this

What people say. Recommended for understanding how to use Entity Framework effectively and comparing its trade-offs with Dapper.

u/Eza0o07in r/dotnet • Recommends

On “Plan for Entity Framework Core 5.0”

link to this video Go to 2:12:12. Tim Corey is a huge fan of Dapper, and not so much of EF. However, in this video he does go through how to use EF effectively, and what to watch out for. At 2:12:12 he does a comparison between EF and Dapper, which might help you out. I do recommend the whole video though.

u/ranblain r/dotnet • Recommends

On “Need help understanding migrating issues for EF Core from 2.2 to 3.1”

You need to watch this video to get a better understanding of why using EF without understanding it is a really bad idea.

u/notmelolin r/dotnet • Mentions

On “Any laracast like learning platform for c#”

link to this video ?