Efcore: Include Microsoft.EntityFrameworkCore.Proxies as default

Created on 19 Jul 2020  路  1Comment  路  Source: dotnet/efcore


The default EFCore package does not support lazy loading but EF team has already implemented a solution by package Microsoft.EntityFrameworkCore.Proxies.


I believe including the lazy loading support into the default EFCore package might be a great help to many, especially to new comers.

closed-wont-fix customer-reported type-enhancement

Most helpful comment

@Banyc we believe that using lazy loading isn't the best practice for many scenarios, because it can very easily lead to N+1 loading issues, hiding severe perf issues. Note also that lazy loading doesn't necessarily require using proxies - it's perfectly possible to do lazy loading without this package.

We therefore provide this as an opt-in feature; including the functionality in the base EF Core would force the Castle.Core dependency on all EF Core users, regardless of whether they want to use lazy loading/proxies or not.

>All comments

@Banyc we believe that using lazy loading isn't the best practice for many scenarios, because it can very easily lead to N+1 loading issues, hiding severe perf issues. Note also that lazy loading doesn't necessarily require using proxies - it's perfectly possible to do lazy loading without this package.

We therefore provide this as an opt-in feature; including the functionality in the base EF Core would force the Castle.Core dependency on all EF Core users, regardless of whether they want to use lazy loading/proxies or not.

Was this page helpful?
0 / 5 - 0 ratings