linq2db / linq2db.EntityFrameworkCore

Bring power of Linq To DB to Entity Framework Core projects
MIT License
462 stars 38 forks source link

[Question] Correct resources cleanup #84

Closed forik closed 3 years ago

forik commented 3 years ago

Hi,

Please help me understand, how does linq2db.EntityFrameworkCore integration cleans up created DataConnection? I see that extensions methods, e.g. ToLinqToDB(), create a linqToDb DataConnection which is IDisposable, but seems like created DataConnection not being diposed and thus connection or command could leak. Am I wrong? Does the integration fully relies on EF Core's connection management?

Thanks

sdanyliv commented 3 years ago

Yes, it tries to reuse EF Core`s connection management.

forik commented 3 years ago

Thanks, closing