Skip to content

Commit

Permalink
fix: null configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarmesquita committed May 15, 2024
1 parent 8532548 commit 4302729
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 74 deletions.
50 changes: 25 additions & 25 deletions src/Repository/Read/AsyncQueryableReadRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Task<IEnumerable<TEntity>> AllMatchingAsync(
ISpecification<TEntity> specification,
CancellationToken cancellationToken)
{
return AllMatchingAsync(specification, _ => { }, cancellationToken);
return AllMatchingAsync(specification, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<long> CountAsync(CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -100,7 +100,7 @@ public Task<bool> AllAsync(
ISpecification<TEntity> specification,
CancellationToken cancellationToken)
{
return AllAsync(specification, _ => { }, cancellationToken);
return AllAsync(specification, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<bool> AllAsync(
Expand All @@ -115,14 +115,14 @@ public Task<bool> AllAsync(
Action<QueryableConfiguration<TEntity>> configuration,
CancellationToken cancellationToken)
{
return GetQueryable(configuration, _ => _).AllAsync(filter, cancellationToken);
return GetQueryable(configuration, e => e).AllAsync(filter, cancellationToken);
}

public Task<bool> AllAsync(
Expression<Func<TEntity, bool>> filter,
CancellationToken cancellationToken)
{
return AllAsync(filter, _ => { }, cancellationToken);
return AllAsync(filter, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<bool> AnyAsync(
Expand All @@ -135,13 +135,13 @@ public Task<bool> AnyAsync(
Action<QueryableConfiguration<TEntity>> configuration,
CancellationToken cancellationToken)
{
return GetQueryable(configuration, _ => _).AnyAsync(cancellationToken);
return GetQueryable(configuration, e => e).AnyAsync(cancellationToken);
}

public Task<bool> AnyAsync(
CancellationToken cancellationToken)
{
return AnyAsync(_ => { }, cancellationToken);
return AnyAsync((Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<bool> AnyAsync(
Expand All @@ -168,7 +168,7 @@ public Task<bool> AnyAsync(
ISpecification<TEntity> specification,
CancellationToken cancellationToken)
{
return AnyAsync(specification, _ => {}, cancellationToken);
return AnyAsync(specification, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<bool> AnyAsync(
Expand All @@ -190,7 +190,7 @@ public Task<bool> AnyAsync(
Expression<Func<TEntity, bool>> filter,
CancellationToken cancellationToken = default)
{
return AnyAsync(filter, _ => {}, cancellationToken);
return AnyAsync(filter, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TEntity>> GetAllAsync(
Expand All @@ -210,7 +210,7 @@ public async Task<IEnumerable<TEntity>> GetAllAsync(
public Task<IEnumerable<TEntity>> GetAllAsync(
CancellationToken cancellationToken = default)
{
return GetAllAsync(_ => { }, cancellationToken);
return GetAllAsync((Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<TEntity> GetAsync(
Expand All @@ -237,7 +237,7 @@ public Task<TEntity> GetAsync(
TKey id,
CancellationToken cancellationToken)
{
return GetAsync(id, _ => {}, cancellationToken);
return GetAsync(id, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TResult>> GetMappedAsync<TResult>(
Expand All @@ -264,7 +264,7 @@ public Task<IEnumerable<TResult>> GetMappedAsync<TResult>(
Expression<Func<TEntity, TResult>> map,
CancellationToken cancellationToken)
{
return GetMappedAsync(filter, map, _ => { }, cancellationToken);
return GetMappedAsync(filter, map, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TResult>> GetMappedAsync<TResult>(
Expand Down Expand Up @@ -294,7 +294,7 @@ public Task<IEnumerable<TResult>> GetMappedAsync<TResult>(
Expression<Func<TEntity, TResult>> map,
CancellationToken cancellationToken = default)
{
return GetMappedAsync(specification, map, _ => {}, cancellationToken);
return GetMappedAsync(specification, map, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TEntity>> GetFilteredAsync(
Expand All @@ -317,7 +317,7 @@ public Task<IEnumerable<TEntity>> GetFilteredAsync(
Expression<Func<TEntity, bool>> filter,
CancellationToken cancellationToken)
{
return GetFilteredAsync(filter, _ => { }, cancellationToken);
return GetFilteredAsync(filter, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<TEntity> GetFirstAsync(
Expand All @@ -340,7 +340,7 @@ public Task<TEntity> GetFirstAsync(
Expression<Func<TEntity, bool>> filter,
CancellationToken cancellationToken)
{
return GetFirstAsync(filter, _ => { }, cancellationToken);
return GetFirstAsync(filter, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<TEntity> GetFirstAsync(
Expand All @@ -367,7 +367,7 @@ public Task<TEntity> GetFirstAsync(
ISpecification<TEntity> specification,
CancellationToken cancellationToken)
{
return GetFirstAsync(specification, _ => {}, cancellationToken);
return GetFirstAsync(specification, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<TResult> GetFirstMappedAsync<TResult>(
Expand Down Expand Up @@ -399,7 +399,7 @@ public Task<TResult> GetFirstMappedAsync<TResult>(
Expression<Func<TEntity, TResult>> map,
CancellationToken cancellationToken)
{
return GetFirstMappedAsync(filter, map, _ => { }, cancellationToken);
return GetFirstMappedAsync(filter, map, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<TResult> GetFirstMappedAsync<TResult>(
Expand Down Expand Up @@ -429,7 +429,7 @@ public Task<TResult> GetFirstMappedAsync<TResult>(
Expression<Func<TEntity, TResult>> map,
CancellationToken cancellationToken = default)
{
return GetFirstMappedAsync(specification, map, _ => {}, cancellationToken);
return GetFirstMappedAsync(specification, map, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TEntity>> GetPagedAsync(
Expand All @@ -451,7 +451,7 @@ public Task<IEnumerable<TEntity>> GetPagedAsync(
int limit,
CancellationToken cancellationToken = default)
{
return GetPagedAsync(limit, _ => {}, cancellationToken);
return GetPagedAsync(limit, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TEntity>> GetPagedAsync(
Expand Down Expand Up @@ -481,7 +481,7 @@ public Task<IEnumerable<TEntity>> GetPagedAsync(
int limit,
CancellationToken cancellationToken)
{
return GetPagedAsync(specification, limit, _ => {}, cancellationToken);
return GetPagedAsync(specification, limit, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TEntity>> GetPagedAsync(
Expand All @@ -506,7 +506,7 @@ public Task<IEnumerable<TEntity>> GetPagedAsync(
int limit,
CancellationToken cancellationToken)
{
return GetPagedAsync(filter, limit, _ => {}, cancellationToken);
return GetPagedAsync(filter, limit, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TEntity>> GetPagedAsync(
Expand All @@ -533,7 +533,7 @@ public Task<IEnumerable<TEntity>> GetPagedAsync(
int pageSize,
CancellationToken cancellationToken)
{
return GetPagedAsync(pageIndex, pageSize, _ => {},
return GetPagedAsync(pageIndex, pageSize, (Action<QueryableConfiguration<TEntity>>)null,
cancellationToken);
}

Expand Down Expand Up @@ -567,7 +567,7 @@ public Task<IEnumerable<TEntity>> GetPagedAsync(
int pageSize,
CancellationToken cancellationToken)
{
return GetPagedAsync(specification, pageIndex, pageSize, _ => {}, cancellationToken);
return GetPagedAsync(specification, pageIndex, pageSize, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<IEnumerable<TEntity>> GetPagedAsync(
Expand Down Expand Up @@ -611,7 +611,7 @@ public Task<IEnumerable<TEntity>> GetPagedAsync(
int pageSize,
CancellationToken cancellationToken)
{
return GetPagedAsync(filter, pageIndex, pageSize, _ => {}, cancellationToken);
return GetPagedAsync(filter, pageIndex, pageSize, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<TEntity> GetSingleAsync(
Expand All @@ -634,7 +634,7 @@ public Task<TEntity> GetSingleAsync(
Expression<Func<TEntity, bool>> filter,
CancellationToken cancellationToken)
{
return GetSingleAsync(filter, _ => { }, cancellationToken);
return GetSingleAsync(filter, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

public Task<TEntity> GetSingleAsync(
Expand All @@ -661,7 +661,7 @@ public Task<TEntity> GetSingleAsync(
ISpecification<TEntity> specification,
CancellationToken cancellationToken)
{
return GetSingleAsync(specification, _ => {}, cancellationToken);
return GetSingleAsync(specification, (Action<QueryableConfiguration<TEntity>>)null, cancellationToken);
}

private async Task<TEntity> GetInternalAsync(TKey id, Action<QueryableConfiguration<TEntity>> configuration = default,
Expand Down
18 changes: 9 additions & 9 deletions src/eQuantic.Core.Data.EntityFramework.Net6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Description>Core Data library for Entity Framework</Description>
<AssemblyTitle>eQuantic.Core.Data.EntityFramework</AssemblyTitle>
<Version>6.0.0.0</Version>
<Version>6.0.1.0</Version>
<Authors>eQuantic Systems</Authors>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>eQuantic.Core.Data.EntityFramework</AssemblyName>
Expand All @@ -23,27 +23,27 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © 2016</Copyright>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<FileVersion>6.0.0.0</FileVersion>
<AssemblyVersion>6.0.1.0</AssemblyVersion>
<FileVersion>6.0.1.0</FileVersion>
<PackageIcon>Icon.png</PackageIcon>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="eQuantic.Core" Version="1.7.0" />
<PackageReference Include="eQuantic.Core.Data" Version="4.2.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.25" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.25">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.30" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.30">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.25" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="6.0.25" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.25">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.30" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="6.0.30" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.30">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.102.2.1" />
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.102.2.4" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions src/eQuantic.Core.Data.EntityFramework.Net7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Description>Core Data library for Entity Framework</Description>
<AssemblyTitle>eQuantic.Core.Data.EntityFramework</AssemblyTitle>
<Version>7.0.0.0</Version>
<Version>7.0.1.0</Version>
<Authors>eQuantic Systems</Authors>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>eQuantic.Core.Data.EntityFramework</AssemblyName>
Expand All @@ -23,27 +23,27 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © 2016</Copyright>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<FileVersion>7.0.0.0</FileVersion>
<AssemblyVersion>7.0.1.0</AssemblyVersion>
<FileVersion>7.0.1.0</FileVersion>
<PackageIcon>Icon.png</PackageIcon>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="eQuantic.Core" Version="1.7.0" />
<PackageReference Include="eQuantic.Core.Data" Version="4.2.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.14">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.19">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="7.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.14">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="7.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.19">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="7.102.2.1" />
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="7.102.2.4" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions src/eQuantic.Core.Data.EntityFramework.Net8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Description>Core Data library for Entity Framework</Description>
<AssemblyTitle>eQuantic.Core.Data.EntityFramework</AssemblyTitle>
<Version>8.0.0.0</Version>
<Version>8.0.1.0</Version>
<Authors>eQuantic Systems</Authors>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>eQuantic.Core.Data.EntityFramework</AssemblyName>
Expand All @@ -23,27 +23,27 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © 2016</Copyright>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<AssemblyVersion>8.0.1.0</AssemblyVersion>
<FileVersion>8.0.1.0</FileVersion>
<PackageIcon>Icon.png</PackageIcon>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="eQuantic.Core" Version="1.7.0" />
<PackageReference Include="eQuantic.Core.Data" Version="4.2.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.3">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="8.102.2.1" />
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="8.102.2.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 4302729

Please sign in to comment.