Starts in:
1 DAY
6 HRS
6 MIN
32 SEC
Starts in:
1 D
6 H
6 M
32 S
Open Closed

how to reach applicaiton manager on other console application project such as DbMigrator layer #2081


User avatar
0
ElifKaya created

Hi,

I added console application project (NMM.Design) to create ModelSnapshot.cs on runtime instead of using add-migration Package Manager Console Commands. Because we have to check some manager rules for our business logic before we create ModelSnapshot.cs.

So, I create ModelSnapshot.cs on runtime. I have no problem about dependency injection but I cannot reach applicaiton manager data using manager service on Design layer. I tried same senario on DbMigrator layer and also I cannot reach it on there. But I can reach same applicaiton manager on Domain Layer. Actauly, Domain layer has beed added as project references indirectly on Design or DbMigrator layer. And also I think that I added necessary modeule as dependOn in DesignModule.cs.

Do you have any advice to reach applicaiton manager on other console application project such as DbMigrator layer?

Thank you in advice

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

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


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

    Hi,

    Can you provide full steps to reproduce? thanks.

  • User Avatar
    0
    ElifKaya created

    Hi,

    Can you provide full steps to reproduce? thanks.

    We want to reach services which in the application layer when just Design console apllication is running. Do you have any advice how can I do this?

    In the first ss, we injected IApplicationSuiteManager in Design console app project, but I have reach any data from this service. In the second ss, I wanted to show that I can reach them from Domain Layer.

    Actauly, Domain project has beed added as project references indirectly on Design app.

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can refer to this Console App.

    https://github.com/abpframework/abp/blob/dev/templates/console/src/MyCompanyName.MyProjectName/Program.cs#L55

  • User Avatar
    0
    ElifKaya created

    hi

    You can refer to this Console App.

    https://github.com/abpframework/abp/blob/dev/templates/console/src/MyCompanyName.MyProjectName/Program.cs#L55

    Thanks ;)

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