Kinan Tassapehji
Kinan Tassapehji

Reputation: 1

How to run the DbMigrator class library after deploying an ABP.IO project?

In abp.io template project (UI: Webassembly, Database: Entity Framework Core, Tiered: Not Tiered) I need to publish the project to IIS. I know that I should publish just the .Host and the .Blazor. But how I can run the DbMigrator to create the DB and seed the data?

I tried to publish the .Host but I got this error HTTP Error 500.30 - ASP.NET Core app failed to start

Upvotes: 0

Views: 1735

Answers (1)

Kalves
Kalves

Reputation: 87

For creating the database and tables

  • Generate the migration file using the dotnet command: dotnet ef migrations add "MIGRATION_NAME" using the Visual Studio Developer terminal on the EntityFrameworkCore project OR The Package Manager Console command as : Add-Migration "MIGRATION_NAME"
  • Check the new generated file in EntityFrameworkCore project, in Migrations repository
  • Run the DbMigrator project as a startup project.

See also:

Upvotes: 0

Related Questions