Open josemojena opened 4 years ago
Issue-Label Bot is automatically applying the label feature_request
to this issue, with a confidence of 0.61. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
I had to do a tricky and horrible alternative instead 🤢
I declared the custom repository as custom service and injected it
services.AddUnitOfWork<TContext>()
.AddCustomRepository<TEntity, TEntityRepository>()
.AddScoped(serviceProvider => (MyEntityRepository)serviceProvider.GetRequiredService<IRepository<TEntity>>());
Maybe you could create an extension method (edit: no you can't)
Hi, how I can add a custom method to the custom repository, now when I get the repository using
_unitOfWork.GetRepository<User>(hasCustomRepository: true)
its impossible to get the custom methods available inside the UserRepository, always I have to convert it to UserRepository using something like thisvar userRepository = _unitOfWork.GetRepository<User>(hasCustomRepository: true) as UsersRepository;
, so is there some way to get access to the custom methods without converting it manually