Ends in:
3 DAYS
8 HRS
20 MIN
37 SEC
Ends in:
3 D
8 H
20 M
37 S
Open Closed

IQueryable method implementation not found in some Volo.Abp modules #7789


User avatar
0
onder created

Hello,

As you see the picture above;

  • In the first green mark, it shows that Volo.Abp.AuditLogging.IAuditLogRepository has GetQueryableAsync method due to that IReadOnlyRepository interface is inheriting. Everything is OK in this part.
  • But, in the second mark, I need the IQueryable method that returns all entity change list. AuditLogRepository doesn't provide that.
  • in the last mark, I need also the IQueryable method that returns all security logs. To do that, we have SecurityLogRepository in the Volo.Abp.Identity assembly. But IReadOnlyRepository interface is not inheriting from the Volo.Abp.Identity.IIdentitySecurityLogRepository interface, that is why we dont use the GetQueryableAsync method

The affected database tables are; AbpEntityChanges, AbpEntityPropertyChanges, AbpSecurityLogs.

Could you help me solve this IQueryable implementation issue? Thanks in advance.

<br>

  • ABP Framework version: 8.2.0
  • UI Type: Angular /
  • Database System: PostgreSQL

4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    you can try reference Volo.Abp.EntityFrameworkCore package in the Application project

    var entityChangeQueryable = (await _auditLogRepository.GetDbContextAsync()).Set<EntityChange>().AsQueryable();
    var securityLogQueryable = (await _identitySecurityLogRepository.GetDbSetAsync()).AsQueryable();
    
  • User Avatar
    0
    onder created

    Thanks for answering. it's solved the issue, but last thing is that I want to get entitychanges info that includes username property so I've tried

    var entityChangeQueryable = (await _auditLogRepository.GetDbContextAsync()).Set<EntityChangeWithUsername>().AsQueryable();

    but "EntityChangeWithUsername" entity didn't work, how can I use it?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    EntityChangeWithUsername is not an entity, just a class

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you can check ABP how do use it. https://github.com/abpframework/abp/blob/dev/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs#L235

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35