BEST
DEALS
OF THE
YEAR!
SAVE UP TO $3,000
24 NOV
1 DEC
00 Days
00 Hrs
00 Min
00 Sec
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
    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

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 20, 2025, 09:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.