Hello,
Could you explain how SetDefaultRepository functionality is supposed to work. For me SetDefaultRepository seems to do nothing. (Tried this in different projects and also tried this on Acme.BookStore tutorial project)
How do I create/set default repository for all entities in dbContext?
Looking at documentation I create classes MyRepositoryBase<TEntity> and MyRepositoryBase<TEntity, TKey>. Then following documentation set them with SetDefaultRepository. context.Services.AddAbpDbContext<BookStoreDbContext>(options => { options.SetDefaultRepositoryClasses( typeof(MyRepositoryBase<,>), typeof(MyRepositoryBase<>) ); }); Base class MyRepositoryBase is ignored.
I get expected result when I set base class for specific entity context.Services.AddAbpDbContext<BookStoreDbContext>(options => { options.AddRepository<Authors.Author, MyRepositoryBase<Authors.Author, Guid>>(); });
Am I not misunderstanding something? I would like to set base class for all entities. How do I accomplish this?