dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.82k stars 3.2k forks source link

EFCore.Proxies should not be strongly coupled to Castle.Core #10746

Closed alexinea closed 2 years ago

alexinea commented 6 years ago

It is very exciting that EFCore team add Lazyload feature into this project. But one question that why you guy use/must use Castle.Core here? Why not allow users to choose themselves?

This is another choice, AspectCore, an Aspect-Oriented Programming based cross platform framework for .NET Core and .NET Framework. It works more efficient and better performing than Castle.Core.

I heard that this afternoon (2018-01-23, 15:00 GMT+8), the young author, @liuhaoyang, has completed an extension for EFCore.Proxies, AspectCore-based, in 3 hours.

BUT...THIS METHOD... https://github.com/aspnet/EntityFrameworkCore/blob/dev/src/EFCore.Proxies/Proxies/Internal/ProxyBindingRewriter.cs#L89 This code makes it impossible for users to choose their own decision. There should be a scalable interface here.

Thank you. Thank you all EFcore team members.

ElderJames commented 6 years ago

I like AspectCore more. 👍

Inuyasha-Monster commented 6 years ago

I like AspectCore more too. 👍

xingwen1987 commented 6 years ago

I'm love to use AspectCore rather than Castle.Core. :+1:

liuhaoyang commented 6 years ago

@alexinea but so far,castle still works more efficient than AspectCore.

liuhaoyang commented 6 years ago

@alexinea we can have other ways to implement lazy loading based on AspectCore.

alexinea commented 6 years ago

As the saying goes, it takes a good blacksmith to make steel. I'll close this issue and just waiting for @liuhaoyang 's works.