-
Notifications
You must be signed in to change notification settings - Fork 255
Description
We have a code base in net6.0 (migrated from net framework 4.8) but still use Entity Framework v6.
We were hoping to use the Specification nuget to update some sections of code, but noticed that Ardalis.Specification.EntityFramework6.csproj only targets framework 4.7.2
EF6 targets NetStandard2.1 so there shouldn't be a reason the Ardalis.Specification.EntityFramework6.csproj can't also target net6.0
The only issue would be AsAsyncEnumerable() would have to throw a NotImplementedException() or NotSupportedException() for the RepositoryBaseOfT EF6 implementation, eg
#if NET6_0_OR_GREATER
/// <summary>
/// Finds all entities of <typeparamref name="T" />, that matches the encapsulated query logic of the
/// <paramref name="specification"/>, from the database.
/// </summary>
/// <param name="specification">The encapsulated query logic.</param>
/// <returns>
/// Returns an IAsyncEnumerable<T> which can be enumerated asynchronously.
/// </returns>
public virtual IAsyncEnumerable<T> AsAsyncEnumerable(ISpecification<T> specification)
{
throw new NotImplementedException();
}
#endif
However, it still allows others to override it and implement their own version of it if they so desire. eg something like https://github.com/dotnet/reactive/blob/main/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs