Premise: Type scanning automatically scans and registers any IRepository and IReadOnlyRepository with the DefaultRepository
- I can extend the BasicRepos service collection to manually add a specific repository implementation for a given entity type
Example
builder.Services.AddBasicRepos()
.AddRepository<MyOverridingRepository>();
- The
AddRepository<TRepository>() extension only accepts types that implements IRepository and/or IReadOnlyRepository and registers a service for each of the implemented interfaces