Starts in:
1 DAY
19 HRS
35 MIN
52 SEC
Starts in:
1 D
19 H
35 M
52 S
Open Closed

DB migration and fluent API #1823


User avatar
0
Neozzz created

I created a new abp solution using the abp cli. The following are the projects within the created solution:

When I run the dbmigrator project I get the following error:

But when I run command: dotnet ef migrations add "test" it doesn't apply the fluent api settings to the database.

I've added some entities and added the fluent api in a different class. I have created "EfCoreFluentApiConfiguration.cs" file and added public static void ConfigureProjectName(this ModelBuilder builder) . Then I called it in the dbcontext class using builder.ConfigureProjectName();

However the fluent api config i added is not reflecting in the migration when i use the cli. But when i run the dbmigrator project i get the error as i mentioned.

Thank you.

  • ABP Framework version: v4.4.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no

3 Answer(s)
  • User Avatar
    0
    Neozzz created

    hi,

    Please update.

    Thanks

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce this problem, could you share a project to reproduce? thanks. shiwei.liang@volosoft.com

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Please reopen if still problem.

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