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

Commit

Permalink
Merge pull request #80 from monstarlab-dotnet/hotfix/missing-virtual-…
Browse files Browse the repository at this point in the history
…methods

Made missing method virtual and used same order of virtual and async …
  • Loading branch information
Morten Turn Pedersen authored Jun 29, 2022
2 parents 17f5791 + 9954079 commit dc3ce5c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageId>Monstarlab.EntityFramework.Extension</PackageId>
<Version>3.0.1</Version>
<Version>3.0.2</Version>
<Authors>Monstarlab</Authors>
<Company>Monstarlab</Company>
<Product>Entity Framework Extension</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public BaseEntityRepository(TContext context)

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

public async Task<TEntity> AddAsync(TEntity entity)
public virtual async Task<TEntity> AddAsync(TEntity entity)
{
if (entity == null)
throw new ArgumentNullException(nameof(entity));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public virtual Task<ListWrapper<TResult>> GetListWithSelectAsync<TResult>(
return GetListAsync(selectedQuery, page, pageSize);
}

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

public async virtual Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(
public virtual async Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(
Expression<Func<TEntity, TResult>> select,
Expression<Func<TEntity, bool>>[] where = null,
Expression<Func<TEntity, object>> orderByExpression = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public virtual Task<ListWrapper<TEntity>> GetListAsync(
return GetListAsync(query, page, pageSize);
}

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

public async virtual Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(Expression<Func<TEntity, TResult>> select,
public virtual async Task<IEnumerable<TResult>> GetListWithSelectAsync<TResult>(Expression<Func<TEntity, TResult>> select,
Expression<Func<TEntity, bool>>[] where = null,
Expression<Func<TEntity, object>> orderByExpression = null,
OrderBy orderBy = OrderBy.Ascending,
Expand Down

0 comments on commit dc3ce5c

Please sign in to comment.