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 18, 2024, 05:54