Код: Выделить всё
public class RWRepository : IRWRepository
Код: Выделить всё
internal sealed class EagerLoadingRWRepository
: RWRepository
, IEagerLoadingRWRepository
Код: Выделить всё
services.AddScoped(typeof(IRWRepository), typeof(RWRepository));
services.AddScoped(typeof(IEagerLoadingRWRepository), typeof(EagerLoadingRWRepository));
Т.е. если оба интерфейса внедрены, то оба должны использовать один и тот же экземпляр EagerLoadingRWRepository, который наследуется от RWRepository
Подробнее здесь: https://stackoverflow.com/questions/711 ... t-instance
Мобильная версия