Activities of "murat.yuceer"

https://support.abp.io/QA/Questions/1233/ABP-Suite-does-not-generate-Blazor-UI-for-a-module

https://support.abp.io/QA/Questions/1222/Call-Api-Without-Dynamic-Proxy-Client-From-Blazor-Wasm--Http-Dynamic-Proxy-Error#answer-70a9566f-d304-2aba-52a4-39fc1df27abd

Hi @maliming how get i get token from blazor server ? IAccessTokenProvider not avaible there

Hi,

I moved us project from blazor wasm to server.

We use devexpress datagrid for some pages => https://demos.devexpress.com/blazor/BindGridtoData#CustomData

For implement server side paging, sort, group by, summary we use https://github.com/DevExpress/DevExtreme.AspNet.Data as devex suggested

Basically DevExtreme.AspNet.Data manipulate IQueryable object by input object (take,skip,where,select,group by etc..)

To provide that, my api have DataSourceLoadOptionsBase input object => https://github.com/DevExpress/DevExtreme.AspNet.Data/blob/master/net/DevExtreme.AspNet.Data/DataSourceLoadOptionsBase.cs

you can see in the example https://docs.devexpress.com/Blazor/DevExpress.Blazor.DataSourceLoadOptionsExtensions.ConvertToGetRequestUri%28DevExtreme.AspNet.Data.DataSourceLoadOptionsBase-System.String%29#remarks

using var response = await Client.GetAsync(options.ConvertToGetRequestUri(dataEndpointUri), cancellationToken);

options type is DataSourceLoadOptionsBase, extension method convert it GetRequestUri format.

But i can not intervene dynamic http proxy system before send request to api.. because of that i call api with http client manual way. You can see example below from devex

protected async Task<LoadResult> LoadCustomData(string dataEndpointUri, DataSourceLoadOptionsBase options, CancellationToken cancellationToken) {
        using var response = await Client.GetAsync(options.ConvertToGetRequestUri(dataEndpointUri), cancellationToken);
        response.EnsureSuccessStatusCode();
        using var responseStream = await response.Content.ReadAsStreamAsync();
        return await JsonSerializer.DeserializeAsync<LoadResult>(responseStream, cancellationToken: cancellationToken);
    }

Hi @maliming, i have information about devex blazor. Did you understand my example ?

If you want to use full server side skills of dxdatagrid, your api have to request DataSourceLoadOptionsBase object (contains some array types, custom IList Filter vb.. look https://github.com/DevExpress/DevExtreme.AspNet.Data/blob/master/net/DevExtreme.AspNet.Data/DataSourceLoadOptionsBase.cs)

But when i use dynamic http proxy, its not serialize get url correct for DataSourceLoadOptionsBase object type, already devex have extension method for that dataSourceLoadOptionsBase.ConvertToGetRequestUri(uri) because of that i need to do custom Get request (I need to determine the query part of the address)

Also i have IModelBinder on httpapi side (implemented from devex document)

    public class DataSourceLoadOptionsBinder : IModelBinder
    {
        public Task BindModelAsync(ModelBindingContext bindingContext)
        {
            var model = Activator.CreateInstance(bindingContext.ModelType);
            DataSourceLoadOptionsParser.Parse((DataSourceLoadOptionsBase)model, key => bindingContext.ValueProvider.GetValue(key).FirstOrDefault());
            bindingContext.Model = model;
            bindingContext.Result = ModelBindingResult.Success(model);
            return Task.CompletedTask;
        }
    }

Hi,

dbcontext

    [ConnectionStringName(EmployeeManagementServiceDbProperties.ConnectionStringName)]
    public class EmployeeManagementServiceDbContext : AbpDbContext<EmployeeManagementServiceDbContext>, IEmployeeManagementDbContext//module dbcontext interface
    {

        public DbSet<EmployeeVestedYearlyLeaveHistory> EmployeeVestedYearlyLeaveHistories { get; set; }
        public DbSet<EmployeePhoto> EmployeePhotos { get; set; }
        public DbSet<EmployeeContract> EmployeeContracts { get; set; }
        ...
        
     public EmployeeManagementServiceDbContext(DbContextOptions<EmployeeManagementServiceDbContext> options) : base(options)
        {

        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);

            builder.ConfigureEmployeeManagement();
        }
    }

appsettings

{
  "App": {
    "SelfUrl": "https://localhost:44371"
  },
  "AuthServer": {
    "Authority": "https://localhost:44322",
    "RequireHttpsMetadata": "true"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "EmployeeManagementService": "Server=localhost,1434;Database=Kuys_EmployeeManagementService;Trusted_Connection=True",
    "AdministrationService": "Server=localhost,1434;Database=Kuys_Administration;Trusted_Connection=True",
    "SaasService": "Server=localhost,1434;Database=Kuys_Saas;Trusted_Connection=True"
  },
  "StringEncryption": {
    "DefaultPassPhrase": ".."
  },
  "Redis": {
    "Configuration": "localhost:6379"
  },
  "RabbitMQ": {
    "Connections": {
      "Default": {
        "HostName": "localhost"
      }
    },
    "EventBus": {
      "ClientName": "Kuys_EmployeeManagementService",
      "ExchangeName": "Kuys"
    }
  },
  "ElasticSearch": {
    "Url": "http://localhost:9200"
  },
  "AbpLicenseCode": ".."
}

Yes but I wanted to approach the event like yours, in future i could seprate more little parts my modules and merge them one service like administration service.. I try to understand why its not worked

By the way what is reason of merge module dbcontexts in one service context?

Thank you

I guess problem is suite generated custom repositries with EmployeeManagementDbContext not used IEmployeeManagementDbContext

We have same scenario, i was created ticket about that. If system grows you will need like that requirements. I thinked maybe features could be scoped if he want. Like feature admin, just can manage own feature and every feature could be scoped about permissions, roles but is an issue to be considered

Hi mailming i found that from abp source code, i guess its work independent (wasm or server)

    public async Task&lt;string&gt; SendAsync(string url)
    {
        var client = HttpClientFactory.CreateClient();
        var requestMessage = new HttpRequestMessage(HttpMethod.Get, url);
        AddHeaders(requestMessage);

        var uri = new Uri(url, UriKind.RelativeOrAbsolute);
        if (!uri.IsAbsoluteUri)
        {
            var remoteServiceConfig = RemoteServiceOptions.RemoteServices.GetConfigurationOrDefault("Default");
            client.BaseAddress = new Uri(remoteServiceConfig.BaseUrl);
            await HttpClientAuthenticator.Authenticate(new RemoteServiceHttpClientAuthenticateContext(client, requestMessage, new RemoteServiceConfiguration(remoteServiceConfig.BaseUrl), string.Empty));
        }

        var response = await client.SendAsync(requestMessage);
        
        return await response.Content.ReadAsStringAsync();
    }
Showing 21 to 30 of 64 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 17, 2025, 08:31
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.