Don't understandable recommendation in documentation
On this page - https://docs.abp.io/en/abp/5.2/Best-Practices/Repositories I see recomendation:
"Do not use generic repository interfaces (like IRepository<IdentityUser, Guid>) from the application code."
but in all examples I see usin this generic interface: for example https://docs.abp.io/en/abp/5.2/Application-Services#crud-application-services or in EShopOnAbp.CatalogService.
If I try use busines interface (ITradingStrategyContextRepository - for example) I have error in Crud service implementation:
If I use generic interface I recive a nothe error:
2022-06-06 12:45:53.765 +07:00 [ERR] An exception was thrown while activating Castle.Proxies.TradingStrategyContextCrudAppServiceProxy.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.TradingStrategyContextCrudAppServiceProxy.
---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Castle.Proxies.TradingStrategyContextCrudAppServiceProxy' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.Domain.Repositories.IRepository`2[MyExchange.TradingStrategy.TradingStrategyContext,System.Guid] repository' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], Volo.Abp.Domain.Repositories.IRepository`2[MyExchange.TradingStrategy.TradingStrategyContext,System.Guid])'.
You can of course use a business interface, but you should make the interface Implement IRepository<,> interface.
For example:
ITradingStrategyContextRepository : IRepository<TradingStrategy, Guid>
If I use generic interface I recive a nothe error:
See: https://github.com/abpframework/abp/issues/7068
@realLiangshiwei Thak you