Activities of "manuel42"

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

I have extended the DataBaseBlobContainer class with a new field a foreign key. In my service I want to create query which used the extended property but I cant it access after I get the IQueryable.

 IQueryable<DatabaseBlobContainer> queryable = (await _databaseBlobContainerRepository.GetQueryableAsync())
 .. here I want to use it

how can I do this ?

Finally I found the solution

.ForMember(dest => dest.ExtraProperties, opt => opt.MapFrom(r => new Dictionary<string, object>() { { "Category", r.Category }, .... and so on))

Maybe this will help others. Thank you maliming for your help.

How can I select the extensions properties from the DatabaseBlob in the mapper ? I always got a exception I tried to acces the properties like this

.ForPath(dest => dest.ExtraProperties["Category"], opt => opt.MapFrom(src => src.Category))

Hi same error again. I also have created the constructor.

DatabaseBlob -> BlobDto (Destination member list) Volo.Abp.BlobStoring.Database.DatabaseBlob -> IT42Portal.AssetManagement.Blob.BlobDto (Destination member list)

Unmapped properties: Category

BlobDto -> DatabaseBlob (Source member list) IT42Portal.AssetManagement.Blob.BlobDto -> Volo.Abp.BlobStoring.Database.DatabaseBlob (Source member list)

Unmapped properties: Category No available constructor.

DatabaseBlob -> CreateBlobDto (Destination member list) Volo.Abp.BlobStoring.Database.DatabaseBlob -> IT42Portal.AssetManagement.Blob.CreateBlobDto (Destination member list)

Done you should received the inivite

I have sent it as 7zip but it was blocked. How should I sent it to you ?

I have sent it to you.

Hi maliming,

thank you for checking. In the meantime I have tried to use another template where all packages have the same version (5.3.4). I got the same error.

  • ABP Framework version: v.6.0.0 (v5.3.3 other packages)
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.Account.Web.Pages.Account.LoginModel -> Volo.Abp.Account.AccountAppService -> Volo.Abp.Account.Emailing.AccountEmailer -> Volo.Abp.UI.Navigation.Urls.AppUrlProvider -> Volo.Abp.TenantManagement.TenantStore -> Volo.Abp.ObjectMapping.DefaultObjectMapper1[[Volo.Abp.TenantManagement.AbpTenantManagementDomainModule, Volo.Abp.TenantManagement.Domain, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null]] -> Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider1[[Volo.Abp.TenantManagement.AbpTenantManagementDomainModule, Volo.Abp.TenantManagement.Domain, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null]] -> λ:Volo.Abp.AutoMapper.IMapperAccessor -> λ:Volo.Abp.AutoMapper.MapperAccessor. ---> AutoMapper.AutoMapperConfigurationException: Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters ====================================================================================== DatabaseBlob -> BlobDto (Destination member list) Volo.Abp.BlobStoring.Database.DatabaseBlob -> IT42Portal.AssetManagement.Blob.BlobDto (Destination member list)

Unmapped properties: Category

  • Steps to reproduce the issue:"

Hi, I have downloaded a module template with abp suite. Then I have created a UnifiedEfCoreEntityExtensionMappings.cs in the xxx.Web.Unified Module. This Class contains the code for the extension

public static void Configure()
{
    OneTimeRunner.Run(() =>            
    {
              
                ObjectExtensionManager.Instance
                   .MapEfCoreProperty<DatabaseBlob, bool>("AdditionalProperty");

              more extensions .....
     });
}
  

I call this method in the UnifieddbContextFactory.cs.

 public UnifiedDbContext CreateDbContext(string[] args)
 {
        UnifiedEfCoreEntityExtensionMappings.Configure(); // HERE

        var configuration = BuildConfiguration();

        var builder = new DbContextOptionsBuilder<UnifiedDbContext>()
            .UseSqlServer(configuration.GetConnectionString("Default"));

        return new UnifiedDbContext(builder.Options);
 }

The migrations is created and the extensions are done in the database. But when I create the mappings I always got the above mentioned exception.

May mappings are done in the xxx.Application.Module and looks like this


        CreateMap<DatabaseBlob, BlobDto>()
            .MapExtraProperties(MappingPropertyDefinitionChecks.None, null, true)
            .ReverseMap();
            
        ... more mappings they look identical

What should I do that the mapping works ?

thank you for your help

I recreated the whole project and now it works. thank you for you help

Showing 21 to 30 of 34 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 14, 2025, 14:54