aspnetboilerplate-samples/MultipleDbContextEfCoreDemo
Oğuzhan Ağır 1b1e50cde0 Added second DbContext and new entities 2024-08-06 14:21:33 +03:00
..
_screenshots Add initial ABP project for MultipleDbContextEfCoreDemo 2024-08-06 11:14:04 +03:00
aspnet-core Added second DbContext and new entities 2024-08-06 14:21:33 +03:00
.gitattributes Add initial ABP project for MultipleDbContextEfCoreDemo 2024-08-06 11:14:04 +03:00
LICENSE Add initial ABP project for MultipleDbContextEfCoreDemo 2024-08-06 11:14:04 +03:00
README.md Added second DbContext and new entities 2024-08-06 14:21:33 +03:00
rename.ps1 Add initial ABP project for MultipleDbContextEfCoreDemo 2024-08-06 11:14:04 +03:00

README.md

Multiple DbContext Demo

A sample project to show multiple Entity Framework Core DbContexts working together.

How To Run

  • Open project in Visual Studio 2017+.
  • Select MultipleDbContextEfCoreDemo.Web as start project.

Run Migrations

  • Open Package Manager Console, select MultipleDbContextEfCoreDemo.EntityFrameworkCore as default project.
  • Run command to create first db migration file: add-migration Added_Person_Entity -Context MultipleDbContextEfCoreDemoDbContext
  • Run command to create second db migration file: add-migration Added_Course_Entity -Contex MultipleDbContextEfCoreDemoSecondDbContext
  • Run the *.Migrator project to apply the changes to the database.

Run Application

  • Run application with F5.
  • You can see peole and course list.
  • You can create a new person here.