Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dirty fix to support .NET6 and .NET7 #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikijano
Copy link

@ikijano ikijano commented Jan 19, 2023

Quick and dirty fix to support .NET6 and .NET7 when keeping EFCore version as is.

I haven't run massive tests but at least simple query doesn't throw when running on .NET6 or .NET7
I think this would fix #40

Before fix FileContextLinqOperatorProvider static constructor would throw following exception when trying query from simple dbset:

      System.TypeInitializationException: The type initializer for 'FileContextCore.Query.Internal.FileContextLinqOperatorProvider' threw an exception.
       ---> System.InvalidOperationException: Sequence contains more than one matching element
         at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
         at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
         at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
         at FileContextCore.Query.Internal.FileContextLinqOperatorProvider..cctor() in C:\source\...\FileContextCore\FileContextCore\Query\Internal\FileContextLinqOperatorProvider.cs:line 175

@ikijano ikijano marked this pull request as ready for review January 19, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No support for .Net 6
1 participant