scottksmith95 / LINQKit

LINQKit is a free set of extensions for LINQ to SQL and Entity Framework power users.
MIT License
1.63k stars 163 forks source link

Refactor project structure. Fix Compile Remove / Compile Include #161

Closed StefH closed 2 years ago

StefH commented 2 years ago

@doboczyakos and @davidnemeti Can you take a look at this PR?

I still needed to fix some things.

doboczyakos commented 2 years ago

I think the build error is because of the portable-net40+win8+wpa81+wp8+sl5 and portable-net45+win8+wpa81+wp8 target frameworks. You should consider removing them. In my opinion no other modifications are needed.

doboczyakos commented 2 years ago

Changing back the LinqKit.Core namespace to LinqKit containing the AsExpandable extension will cause build error 'The call is ambiguous between the following methods or properties' if you have reference to both LinqKit.Core and LinqKit packages

doboczyakos commented 2 years ago

LinqKit.EntityFramework.Tests.Net452.DbAsyncTests.DbAsync_EnumerateShouldWorkAsync [FAIL]

This is because AsExpandable() was called from LinqKit.Core instead of LinqKit. That's why we moved it to a new namespace to avoid the 'ambiguous call' build error and stay compatible when someone calls AsExpandable on an EF or EF Core IQueryable. In that rare case when someone used AsExpandable from LinqKit.Core this is a breaking change but it can be simply resolved by adding 'using LinqKit.Core;'

StefH commented 2 years ago

Build is fixed.

However these changes: image

Are still needed, because you don;t need to include source files anymore because we now include a project (LinqKit.Core)

doboczyakos commented 2 years ago

Some files (ExpandableQuery, Extensions) are still needed that's why I've added #if NOEF to the beginning of appropriate files.

StefH commented 2 years ago

@doboczyakos

I think all is correctly fixed, can you check ?

doboczyakos commented 2 years ago

@doboczyakos

I think all is correctly fixed, can you check ?

Seems great. Thanks.