Upgrading to EF5.0
This commit is contained in:
parent
6dfb5810b9
commit
7a7a6fa3f5
@ -9,7 +9,7 @@
|
|||||||
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
||||||
<RepositoryType>github</RepositoryType>
|
<RepositoryType>github</RepositoryType>
|
||||||
<PackageTags>powered,soft,orm,db,context,ef,ef6,efcore,factory</PackageTags>
|
<PackageTags>powered,soft,orm,db,context,ef,ef6,efcore,factory</PackageTags>
|
||||||
<Version>2.0.0$(VersionSuffix)</Version>
|
<Version>3.0.0$(VersionSuffix)</Version>
|
||||||
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
||||||
<Product>PoweredSoft.Data.Core</Product>
|
<Product>PoweredSoft.Data.Core</Product>
|
||||||
<Description>Library to abstract orm.</Description>
|
<Description>Library to abstract orm.</Description>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
||||||
<RepositoryType>github</RepositoryType>
|
<RepositoryType>github</RepositoryType>
|
||||||
<PackageTags>powered,soft,orm,db,context,ef,ef6,efcore,factory</PackageTags>
|
<PackageTags>powered,soft,orm,db,context,ef,ef6,efcore,factory</PackageTags>
|
||||||
<Version>2.0.0$(VersionSuffix)</Version>
|
<Version>3.0.0$(VersionSuffix)</Version>
|
||||||
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
||||||
<Product>PoweredSoft.Data.EntityFramework</Product>
|
<Product>PoweredSoft.Data.EntityFramework</Product>
|
||||||
<Description>the abstraction implementation for EF Core.</Description>
|
<Description>the abstraction implementation for EF Core.</Description>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EntityFramework" Version="6.3.0" />
|
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
using Microsoft.EntityFrameworkCore.Query.Internal;
|
using Microsoft.EntityFrameworkCore.Query.Internal;
|
||||||
using PoweredSoft.Data.Core;
|
using PoweredSoft.Data.Core;
|
||||||
using System;
|
using System;
|
||||||
@ -12,23 +13,23 @@ namespace PoweredSoft.Data.EntityFrameworkCore
|
|||||||
{
|
{
|
||||||
public class AsyncQueryableHandlerService : IAsyncQueryableHandlerService
|
public class AsyncQueryableHandlerService : IAsyncQueryableHandlerService
|
||||||
{
|
{
|
||||||
public Task<T> FirstOrDefaultAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default(CancellationToken))
|
public Task<T> FirstOrDefaultAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default)
|
||||||
=> queryable.FirstOrDefaultAsync(cancellationToken);
|
=> queryable.FirstOrDefaultAsync(cancellationToken);
|
||||||
public Task<T> FirstOrDefaultAsync<T>(IQueryable<T> queryable, Expression<Func<T, bool>> predicate, CancellationToken cancellationToken = default(CancellationToken))
|
public Task<T> FirstOrDefaultAsync<T>(IQueryable<T> queryable, Expression<Func<T, bool>> predicate, CancellationToken cancellationToken = default)
|
||||||
=> queryable.FirstOrDefaultAsync(predicate, cancellationToken);
|
=> queryable.FirstOrDefaultAsync(predicate, cancellationToken);
|
||||||
public Task<List<T>> ToListAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default(CancellationToken))
|
public Task<List<T>> ToListAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default)
|
||||||
=> queryable.ToListAsync(cancellationToken);
|
=> queryable.ToListAsync(cancellationToken);
|
||||||
public Task<int> CountAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default(CancellationToken))
|
public Task<int> CountAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default)
|
||||||
=> queryable.CountAsync();
|
=> queryable.CountAsync();
|
||||||
public Task<long> LongCountAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default(CancellationToken))
|
public Task<long> LongCountAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default)
|
||||||
=> queryable.LongCountAsync();
|
=> queryable.LongCountAsync();
|
||||||
|
|
||||||
public bool CanHandle<T>(IQueryable<T> queryable) => queryable.Provider is IAsyncQueryProvider;
|
public bool CanHandle<T>(IQueryable<T> queryable) => queryable.Provider is IAsyncQueryProvider;
|
||||||
|
|
||||||
public Task<bool> AnyAsync<T>(IQueryable<T> queryable, Expression<Func<T, bool>> predicate, CancellationToken cancellationToken = default(CancellationToken))
|
public Task<bool> AnyAsync<T>(IQueryable<T> queryable, Expression<Func<T, bool>> predicate, CancellationToken cancellationToken = default)
|
||||||
=> queryable.AnyAsync(predicate, cancellationToken);
|
=> queryable.AnyAsync(predicate, cancellationToken);
|
||||||
|
|
||||||
public Task<bool> AnyAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default(CancellationToken))
|
public Task<bool> AnyAsync<T>(IQueryable<T> queryable, CancellationToken cancellationToken = default)
|
||||||
=> queryable.AnyAsync(cancellationToken);
|
=> queryable.AnyAsync(cancellationToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
||||||
<RepositoryType>github</RepositoryType>
|
<RepositoryType>github</RepositoryType>
|
||||||
<PackageTags>powered,soft,orm,db,context,ef,ef6,efcore,factory</PackageTags>
|
<PackageTags>powered,soft,orm,db,context,ef,ef6,efcore,factory</PackageTags>
|
||||||
<Version>2.0.0$(VersionSuffix)</Version>
|
<Version>3.0.0$(VersionSuffix)</Version>
|
||||||
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
||||||
<Product>PoweredSoft.Data.EntityFrameworkCore</Product>
|
<Product>PoweredSoft.Data.EntityFrameworkCore</Product>
|
||||||
<Description>the abstraction implementation for EF Core.</Description>
|
<Description>the abstraction implementation for EF Core.</Description>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.9" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
||||||
<RepositoryType>github</RepositoryType>
|
<RepositoryType>github</RepositoryType>
|
||||||
<PackageTags>async,queryable,handler,service,di</PackageTags>
|
<PackageTags>async,queryable,handler,service,di</PackageTags>
|
||||||
<Version>2.0.0$(VersionSuffix)</Version>
|
<Version>3.0.0$(VersionSuffix)</Version>
|
||||||
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
||||||
<Product>PoweredSoft.Data.InMemory</Product>
|
<Product>PoweredSoft.Data.InMemory</Product>
|
||||||
<Description>Library to abstract orm.</Description>
|
<Description>Library to abstract orm.</Description>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
||||||
<RepositoryType>github</RepositoryType>
|
<RepositoryType>github</RepositoryType>
|
||||||
<PackageTags>powered,soft,async,queryable,handler</PackageTags>
|
<PackageTags>powered,soft,async,queryable,handler</PackageTags>
|
||||||
<Version>2.0.0$(VersionSuffix)</Version>
|
<Version>3.0.0$(VersionSuffix)</Version>
|
||||||
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
||||||
<Product>PoweredSoft.Data.MongoDB</Product>
|
<Product>PoweredSoft.Data.MongoDB</Product>
|
||||||
<Description>the abstraction implementation for MongoDB.</Description>
|
<Description>the abstraction implementation for MongoDB.</Description>
|
||||||
@ -21,8 +21,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
|
||||||
<PackageReference Include="MongoDB.Driver" Version="2.9.3" />
|
<PackageReference Include="MongoDB.Driver" Version="2.13.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
<RepositoryUrl>https://github.com/PoweredSoft/Data</RepositoryUrl>
|
||||||
<RepositoryType>github</RepositoryType>
|
<RepositoryType>github</RepositoryType>
|
||||||
<PackageTags>async,queryable,handler,service,di</PackageTags>
|
<PackageTags>async,queryable,handler,service,di</PackageTags>
|
||||||
<Version>2.0.0$(VersionSuffix)</Version>
|
<Version>3.0.0$(VersionSuffix)</Version>
|
||||||
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;r=g&amp;d=retro</PackageIconUrl>
|
||||||
<Product>PoweredSoft.Data</Product>
|
<Product>PoweredSoft.Data</Product>
|
||||||
<Description>Library to abstract orm.</Description>
|
<Description>Library to abstract orm.</Description>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user