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

Fix preprocessor directives in EF Core project to account for net6.0 #219

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

fiseni
Copy link
Collaborator

@fiseni fiseni commented Jan 13, 2022

Some of the ORM features are not available in EF Core 3, so we've been using preprocessor directives. The condition was fine, but now that we added additional TFM net6.0, they're excluded from it as well.

	public SpecificationEvaluator(bool cacheEnabled = false)
	{
		this.evaluators.AddRange(new IEvaluator[]
		{
			WhereEvaluator.Instance,
			SearchEvaluator.Instance,
			cacheEnabled ? IncludeEvaluator.Cached : IncludeEvaluator.Default,
			OrderEvaluator.Instance,
			PaginationEvaluator.Instance,
			AsNoTrackingEvaluator.Instance,
			IgnoreQueryFiltersEvaluator.Instance,
#if NETSTANDARD2_1
			AsSplitQueryEvaluator.Instance,
			AsNoTrackingWithIdentityResolutionEvaluator.Instance
#endif
		});
	}

So, instead of #if NETSTANDARD2_1, we should use negation #if !NETSTANDARD2_0.

@fiseni fiseni requested a review from ardalis January 13, 2022 13:54
@ardalis ardalis merged commit b44367a into main Jan 18, 2022
@ardalis ardalis deleted the fiseni/preprocessor-directives branch January 18, 2022 21:23
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.

2 participants