Starts in:
0 DAY
17 HRS
8 MIN
42 SEC
Starts in:
0 D
17 H
8 M
42 S

Activities of "Kaspars.Avotins"

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?

Showing 11 to 11 of 11 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06