How i can override GetQueryableAsync
generically ? I have tried multiple ways but it doesn't work.
#20431
-
I did this and multiple solution similar to this but it doesn't work. public class MyCustomRepository<TEntity, TKey>(IDbContextProvider<BookStoreDbContext> dbContextProvider)
: EfCoreRepository<BookStoreDbContext, TEntity, TKey>(dbContextProvider)
where TEntity : class, IEntity<TKey>
{
public override Task<IQueryable<TEntity>> GetQueryableAsync()
{
return base.GetQueryableAsync();
}
} context.Services.Replace(ServiceDescriptor.Transient(
typeof(IRepository<, >),
typeof(MyCustomRepository<, >)
));
`` |
Beta Was this translation helpful? Give feedback.
Answered by
maliming
Aug 7, 2024
Replies: 1 comment 1 reply
-
https://www.abp.io/docs/8.3/framework/data/entity-framework-core#set-default-repository-classes |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
BirajMainali
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.abp.io/docs/8.3/framework/data/entity-framework-core#set-default-repository-classes