Käyttäjän "murat.yuceer" toiminnot

  • ABP Framework version: v4.3.3
  • UI type: Blazor Server
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hi, How can i enabile email settings page for tenant?

When i login with host admin i see email settings

but when login with tenant admin its look like

Just i try to find interface in abp to get token independent wasm/server/console

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

    public async Task<string> 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();
    }

According to my scenario, I have to sync my users between my modules. But unlike your cmskit module, I should be able to add users through my page in my module project. In other words, the user I add from the module must be synchronous to the identity module (i.e. I should not be dependent on identity module screens).

How should I go about this process? (who should throw an event to whom? Should a user be added directly to the identity module via API call? etc..).

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

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

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

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": ".."
}

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;
        }
    }
  • ABP Framework version: v4.3.0
  • UI type: Blazor Server
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

Hi, I created project with suite microservice template. Everythink worked correct (i started project with tye) Also i have module project. I created them with module template. I added new service to microservice project as document show. After i referenced module to this service. I did as you do in saas service. But when i run any api method that interact with database from swagger its throw error

Autofac.Core.DependencyResolutionException: An exception was thrown while activating Kuys.Module.EmployeeManagement.EntityFrameworkCore.EmployeeManagementDbContext -> ?:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Kuys.Module.EmployeeManagement.EntityFrameworkCore.EmployeeManagementDbContext, Kuys.Module.EmployeeManagement.EntityFrameworkCore, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]. ---> Volo.Abp.AbpException: No configuration found for Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore, Version=5.0.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60! Use services.Configure

When i comment below lines its working

        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAbpDbContext&lt;EmployeeManagementServiceDbContext&gt;(options =>
            {
                options.ReplaceDbContext&lt;IEmployeeManagementDbContext&gt;();

                /* Remove "includeAllEntities: true" to create
                 * default repositories only for aggregate roots */
                options.AddDefaultRepositories(includeAllEntities: true);
            });
            ....
        }

My module api method using custom repository, this repository try to access dbcontext inside it.

Where i missing or is it could be bug? I guess ReplaceDbContext not work correct??

Näytetään 41 - 50/76 tietueesta
Made with ❤️ on ABP v8.2.0-preview Updated on maaliskuuta 25, 2024, 15.11