Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit dc3ce5c

Browse files
author
Morten Turn Pedersen
authored
Merge pull request #80 from monstarlab-dotnet/hotfix/missing-virtual-methods
Made missing method virtual and used same order of virtual and async …
2 parents 17f5791 + 9954079 commit dc3ce5c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Monstarlab.EntityFramework.Extension/Monstarlab.EntityFramework.Extension.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<PackageId>Monstarlab.EntityFramework.Extension</PackageId>
6-
<Version>3.0.1</Version>
6+
<Version>3.0.2</Version>
77
<Authors>Monstarlab</Authors>
88
<Company>Monstarlab</Company>
99
<Product>Entity Framework Extension</Product>

Monstarlab.EntityFramework.Extension/Repositories/BaseEntityRepository.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public BaseEntityRepository(TContext context)
1111

1212
public virtual Task<TEntity> GetAsync(TId id) => BaseIncludes().FirstOrDefaultAsync(entity => entity.Id.Equals(id));
1313

14-
public async Task<TEntity> AddAsync(TEntity entity)
14+
public virtual async Task<TEntity> AddAsync(TEntity entity)
1515
{
1616
if (entity == null)
1717
throw new ArgumentNullException(nameof(entity));

Monstarlab.EntityFramework.Extension/Repositories/EntityRepository.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public virtual Task<ListWrapper<TResult>> GetListWithSelectAsync<TResult>(
3131
return GetListAsync(selectedQuery, page, pageSize);
3232
}
3333

34-
public async virtual Task<IEnumerable<TEntity>> GetListAsync(
34+
public virtual async Task<IEnumerable<TEntity>> GetListAsync(
3535
Expression<Func<TEntity, bool>>[] where = null,
3636
Expression<Func<TEntity, object>> orderByExpression = null,
3737
OrderBy orderBy = OrderBy.Ascending)
@@ -41,7 +41,7 @@ public async virtual Task<IEnumerable<TEntity>> GetListAsync(
4141
return await query.ToListAsync();
4242
}
4343

44-
public async virtual Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(
44+
public virtual async Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(
4545
Expression<Func<TEntity, TResult>> select,
4646
Expression<Func<TEntity, bool>>[] where = null,
4747
Expression<Func<TEntity, object>> orderByExpression = null,

Monstarlab.EntityFramework.Extension/Repositories/EntitySoftDeleteRepository.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public virtual Task<ListWrapper<TEntity>> GetListAsync(
3131
return GetListAsync(query, page, pageSize);
3232
}
3333

34-
public async virtual Task<IEnumerable<TEntity>> GetListAsync(
34+
public virtual async Task<IEnumerable<TEntity>> GetListAsync(
3535
Expression<Func<TEntity, bool>>[] where = null,
3636
Expression<Func<TEntity, object>> orderByExpression = null,
3737
OrderBy orderBy = OrderBy.Ascending,
@@ -57,7 +57,7 @@ public virtual Task<ListWrapper<TResult>> GetListWithSelectAsync<TResult>(Expres
5757
return GetListAsync(selectedQuery, page, pageSize);
5858
}
5959

60-
public async virtual Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(Expression<Func<TEntity, TResult>> select,
60+
public virtual async Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(Expression<Func<TEntity, TResult>> select,
6161
Expression<Func<TEntity, bool>>[] where = null,
6262
Expression<Func<TEntity, object>> orderByExpression = null,
6363
OrderBy orderBy = OrderBy.Ascending,

0 commit comments

Comments
 (0)