Activities of "ya-dev"

  • ABP Framework version: v5.2.2

Hi,

Is it possible to load module(s) at runtime instead of adding them using "DependsOnAttribute"? Or can you suggest a reasonable workaround compatible with Abp framework?

For example;

public class ModuleA : AbpModule 
{
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        if (...)
        {
            context.Services.AddDependentModule(typeof(ModuleX));
        }
        else 
        {            
            context.Services.AddDependentModule(typeof(ModuleY));
        }
    }
}

Instead of

[DependsOn(typeof(ModuleX))]
[DependsOn(typeof(ModuleY))]
public class ModuleA : AbpModule
...

ABP Framework version: v4.3

  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular):Yes

Hi, getPasswordValidators method in '@abp/ng.theme.shared' library does not work except Latin alphabet. Could you please check?

Thanks

Question

Hi, I have seen some fields that are not translated into several languages such as Russian, French, German, Spanish, Portuguese and Arabic. I would like to know that does ABP plan to make development for those language fields?

Hi @maliming,

Thanks for your assitance. It worked.

do you want to change this translation?
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/tr.json#L15

Yes I do.

Hi,

I want to override abp's messages like "EntityNotFoundErrorMessage". I've tried inheriting resources but it didn't work.

Any ideas will be appreciated.

Thanks.

Answer

Your entity interface should be defined as follows:

  export interface Entity<TKey> {
    id: TKey;
    ...
  }

  • ABP Framework version: v4.3.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi,

I've a validator class which inherits FluentValidaton's abstract class described as AbstractValidator<T>. I inject IRepository<MyEntity> within the constructor. Then I use this repository in a private method of my validator. Before 4.3.0 upgrade this code works fine. But after the upgrade it throws an exception that says "Cannot access a disposed context instance...". And also if I inject IUnitOfWorkManager and start a new unit of work by using scope, my code works fine again. What is the problem that lies behind, any ideas?

    public class MyDtoValidator : AbstractValidator<MyDto>
    {
        private readonly IRepository<MyEntity, long> _repository;
        private readonly IUnitOfWorkManager _unitOfWorkManager;

        public MyDtoValidator(IRepository<MyEntity, long> repository,            
            IUnitOfWorkManager unitOfWorkManager)
        {
            _repository = repository;
            _unitOfWorkManager = unitOfWorkManager;

            RuleFor(cf => cf.Property).NotEmpty().MustAsync((dto, key, cancellationToken) => MyAsyncMethod(dto)).WithMessage((dto, field) =>
            {
                return "message";
            }); ;

        }

        private async Task<bool> MyAsyncMethod(MyDto dto)
        {
            using (var uow = _unitOfWorkManager.Begin(true)) // without this line, it crashes.
            {
                var query = await _repository.GetQueryableAsync();

                query = query.Where(x => x.Property == dto.Property);

                var existingDto = await _repository.AsyncExecuter.FirstOrDefaultAsync(query);

                return !(existingDto != null && dto.Id != existingDto.Id);
            }
        }
    }

Thanks for your attention.

Hi,

I think the problem is clear and easy to reproduce. Also I've linked a related problem. I cannot share the source code. It's a corporate project and contains sensitive information.

Thanks.

  • ABP Framework version: v4.0
  • DB provider: EF Core

Hi,

I've added an entity to my context which has a navigation property to tenants table. Migration file's been created with success. But when I try to run DbMigrator app, it throws an exception like this:

And my entity's config is like this:

gl.HasOne(g => g.Tenant).WithMany().HasForeignKey(g => g.TenantId);

How can I solve this problem?

Thanks.

PS: Related with this post

Showing 21 to 30 of 51 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.2.0-preview. Updated on February 17, 2026, 09:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.