We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When calling .AddJsonApi() combined with assembly scanning, it discards and overwrites any prior open-generic registrations.
.AddJsonApi()
Example:
// Startup.ConfigureServices services.AddScoped(typeof(IResourceRepository<,>), typeof(CustomJsonApiRepository<,>)); services.AddScoped(typeof(IResourceReadRepository<,>), typeof(CustomJsonApiRepository<,>)); services.AddScoped(typeof(IResourceWriteRepository<,>), typeof(CustomJsonApiRepository<,>)); services.AddJsonApi<AppDbContext>(discovery: facade => facade.AddCurrentAssembly()); // ArticleRepository.cs public class ArticleRepository : CustomJsonApiRepository<Article, Guid> { ... }
will add the next registration:
services.AddScoped<IResourceReadRepository<Article, Guid>, EntityFrameworkCoreRepository<Article, Guid>>();
instead of the expected:
services.AddScoped<IResourceReadRepository<Article, Guid>, CustomJsonApiRepository<Article, Guid>>();
Because of this, it is impossible to combine assembly scanning with replaced open-generic registrations.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
When calling
.AddJsonApi()
combined with assembly scanning, it discards and overwrites any prior open-generic registrations.Example:
will add the next registration:
instead of the expected:
Because of this, it is impossible to combine assembly scanning with replaced open-generic registrations.
The text was updated successfully, but these errors were encountered: