Repository WithDetails() function need ThenInclude() function in "many to many" scene
WithDetails is implemented per entity, so you can use ThenInclude for your entity. Can you explain a bit more?
@hikalkan ThenInclude function is useful in many-to-many entity. Considering for user and role, if i want to query user repository with all of their role name.
IRepository<User> userRepository...
userRepository.WithDetail(p=>p.User2Role).ThenWithDetail(p=>p.Role)
Will document WithDetails's usage. Then we see if we need to support additional scenarios.
So what's the conclusion? Otherwise we need reference the EntityFrameworkCore in application layer.
For now, go with referencing the Volo.Abp.EntityFrameworkCore package to your application layer since at first look it doesn't fit to a generic repository interface. If we implement it later, you replace your code if you like.
referencing the Volo.Abp.EntityFrameworkCore package to application layer and then how to do that?
referencing the Volo.Abp.EntityFrameworkCore package to application layer and then how to do that?
Use Include in EF Core to load navigation property
IRepository<User> userRepository...
userRepository.Include(p=>p.User2Role).ThenInclude(p=>p.Role)
Most helpful comment
Use Include in EF Core to load navigation property