Member-only story

Entity Framework Core 8 Breaking Changes You Cannot Ignore

There are at least 9 breaking changes in EF Core 8.

Alex Maher
4 min readDec 8, 2023

Entity Framework Core 8 (EF Core 8) is here, and it’s packed with improvements.

However, with new features come changes that might impact your existing applications. Let’s dive into nine important breaking changes you should be aware of.

I tried to explain these as simple as possible and beginner friendly.

If you have any questions, don’t hesitate to leave it in the comments!

Alright, let’s go!

1. Changes in LINQ Queries with Contains

Stepping up the game for efficiency, but watch out for older SQL Server versions. This change is a balancing act between performance and compatibility

Old Behavior: Contains in LINQ queries worked across all SQL Server versions but was inefficient.

New Behavior: In EF Core 8.0, Contains generates efficient SQL but is incompatible with SQL Server 2014 and older versions.

Example:

var names = new[] { "Blog1", "Blog2" };
var blogs = await context.Blogs
.Where(b => names.Contains(b.Name))…

--

--

Alex Maher
Alex Maher

Written by Alex Maher

.NET C# dev with 10+ yrs exp, self-taught & passionate web developer. Sharing tips & experiences in C# and web dev.