Activities of "thanhlg"

Is the Blazor server a tiered solution?

Yes, that's correct.

It worked. Thank you very much.

But I'm still facing an issue. Currently, in Blazor WebAssembly, I have code in HttpApi.Client.

and I use context.GetHttpContext().Request.Headers["screen-url"].ToString(); to get the URL.

However, using this approach won't work in Blazor Server. Is there any way to retrieve the URL when using Blazor Server?

It seems that the project screenshot you sent is not mine. I have tried downloading and checking it. This is my project.

Sorry, I have sent you a new email. Please check it again.

Hi liangshiwei,

I have sent you an email, please check and assist me. Thanks.

Check the docs before asking a question: How to use extended field query in EF query?, [Filter User list by new extra property #784](https://support.abp.io/QA/Questions/784/Filter-User-list-by-new-extra-property), How to add custom property to the user entity,Module Entity Extensions | Documentation Center | ABP.IO ...

  • ABP Framework version: v8.0.2
  • UI Type: Blazor WASM / Blazor Server
  • Database System: EF Core (PostgreSQL)

Hi Support Teams,

I have two questions:

  1. Is there a way to use ScreenUrl within ExtraProperties instead of creating an additional ScreenUrl column and using EF.Property(u, "ScreenUrl") to write the query statement?

Below is my code.

2. How can I add `context.GetHttpContext().Request.Headers["screen-url"]` to the `ScreenUrl` column in `EntityChanges`? Currently, when I run it, it only adds it to the `ScreenUrl` in `ExtraProperties` but doesn't save it to the newly added `ScreenUrl` column.

public class ExtendedAuditLogContributor : AuditLogContributor
{
    public override void PreContribute(AuditLogContributionContext context)
    {  
        context.AuditInfo.SetProperty(
        "ScreenUrl",
            context.GetHttpContext().Request.Headers["screen-url"]
        );

    }

    public override void PostContribute(AuditLogContributionContext context)
    {
        var currentUser = context.ServiceProvider.GetRequiredService<ICurrentUser>();
         
        foreach (var change in context.AuditInfo.EntityChanges)
        {
            change.SetProperty(
            "ScreenUrl",
            context.GetHttpContext().Request.Headers["screen-url"]);

            change.SetProperty(
            "UserId", currentUser.Id); 
        }
    }
}

What if the data exceeds int.MaxValue?

[ExposeServices(typeof(IAuditLogsAppService))] 
public class MyAuditLogsAppService : AuditLogsAppService 
{ 
    public MyAuditLogsAppService(IAuditLogRepository auditLogRepository, IJsonSerializer jsonSerializer, IPermissionChecker permissionChecker, IPermissionDefinitionManager permissionDefinitionManager) : base(auditLogRepository, jsonSerializer, permissionChecker, permissionDefinitionManager) 
    { 
    } 
} 

Can you help me write the GetEntityChangesAsync(GetEntityChangesDto input) method without being limited by MaxResultCount?

public override void ConfigureServices(ServiceConfigurationContext context)  
{  
    LimitedResultRequestDto.MaxMaxResultCount = int.MaxValue;  
    ExtensibleLimitedResultRequestDto.MaxMaxResultCount = int.MaxValue;  
}  
  

Thanks for the support, but if I don't use this configuration, can you help me rewrite the 'GetEntityChanges' method without using pagination and without limiting the number of results?

and I would like to be able to retrieve more than 1000 records because the current MaxResultCount limit is 1000.

You can try:

public override void ConfigureServices(ServiceConfigurationContext context) 
{ 
    ExtensibleLimitedResultRequestDto.MaxMaxResultCount = int.MaxValue; 
} 
 

Showing 31 to 40 of 51 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13