Open Closed

Minimal implementation. #3080


User avatar
0
james@melvin.tech created
  • ABP Framework version: v5.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

Im looking at using the abp suite to model our API faster but we want a base application running. Ive removed all the ABP for authorisation, permissions, features, saas etc. I only really have auditing left. It builds but the automapper isnt getting registered. I cant see where and how I need to correctly register my AutoMapper profile again.

I can get it working via swagger if i modify {MyProject}HttpApiHostModule : AbpModule adding the following.

context.Services.AddAutoMapperObjectMapper<{MyProject}HttpApiHostModule>();

Configure<AbpAutoMapperOptions>(options => { options.AddProfile<{MyProject}ApplicationAutoMapperProfile>(validate: true); });

The problem is i cant find a way to get tests to run and is this a suitable place to register it.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Im looking at using the abp suite to model our API faster but we want a base application running. Ive removed all the ABP for authorisation, permissions, features, saas etc. I only really have auditing left.

    Not sure what changes you made to the template.

    Usually you can place to the ...ApplicationModule.

    It makes both tests and API working. just like we do: https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs#L26

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11