Skip to content

Commit

Permalink
fix IRepositoryQueryAsyncAdvice
Browse files Browse the repository at this point in the history
  • Loading branch information
kinosang committed Apr 25, 2024
1 parent ec5b42f commit 1416c58
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.3" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.4" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="8.0.4" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) ">
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.28" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.29" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="6.0.29" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class EntityFrameworkCoreRepository<TContext, TEntity> : RepositoryBase<T
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, TResult>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, TResult>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -72,7 +72,7 @@ public class EntityFrameworkCoreRepository<TContext, TEntity> : RepositoryBase<T
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, TResult>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, TResult>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -86,7 +86,7 @@ public class EntityFrameworkCoreRepository<TContext, TEntity> : RepositoryBase<T
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, bool>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, bool>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -100,7 +100,7 @@ public class EntityFrameworkCoreRepository<TContext, TEntity> : RepositoryBase<T
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, int>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, int>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -114,7 +114,7 @@ public class EntityFrameworkCoreRepository<TContext, TEntity> : RepositoryBase<T
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, long>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, long>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Schemata.Entity.LinqToDB/LinQ2DbRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class LinQ2DbRepository<TContext, TEntity> : RepositoryBase<TEntity>
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, TResult>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, TResult>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -88,7 +88,7 @@ public class LinQ2DbRepository<TContext, TEntity> : RepositoryBase<TEntity>
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, TResult>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, TResult>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -102,7 +102,7 @@ public class LinQ2DbRepository<TContext, TEntity> : RepositoryBase<TEntity>
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, bool>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, bool>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -116,7 +116,7 @@ public class LinQ2DbRepository<TContext, TEntity> : RepositoryBase<TEntity>
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, int>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, int>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand All @@ -130,7 +130,7 @@ public class LinQ2DbRepository<TContext, TEntity> : RepositoryBase<TEntity>
var query = await BuildQueryAsync(predicate, ct);

var context = new QueryContext<TEntity, TResult, long>(this, query);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, IAsyncEnumerable<TResult>>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
var next = await Advices<IRepositoryQueryAsyncAdvice<TEntity, TResult, long>>.AdviseAsync(ServiceProvider, AdviceContext, context, ct);
if (!next) {
return context.Result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Schemata.Abstractions.Advices;
using Schemata.Abstractions.Entities;
using Schemata.Abstractions.Exceptions;
using Schemata.Abstractions.Resource;

namespace Schemata.Resource.Foundation.Advices;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Schemata.Abstractions.Advices;
using Schemata.Abstractions.Entities;
using Schemata.Abstractions.Exceptions;
using Schemata.Abstractions.Resource;

namespace Schemata.Resource.Foundation.Advices;

Expand Down

0 comments on commit 1416c58

Please sign in to comment.