0

Is it possible to Create/connect to multiple database in one single DAL using codefirst migration?

Ex:

namespace School.DAL.DbContexts
{
    public class RoomDBContext: DbContext
    {
        public RoomDBContext() : base("RoomConnString") { }
        public DbSet<Teacher> Teachers { get; set; }
        public DbSet<Student> Students { get; set; }
    }
}

namespace School.DAL.DbContexts
{
    public class BookDBContext: DbContext
    {
        public BookDBContext() : base("BookConnString") { }
        public DbSet<Book> Books { get; set; }
        public DbSet<Category> Categories { get; set; }
    }
}
cypher-lad
  • 15
  • 3

0 Answers0