mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
661 B
18 lines
661 B
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Design;
|
|
|
|
namespace MicroserviceDemo.AuthServer.Db
|
|
{
|
|
/* This class is needed for EF Core command line tooling */
|
|
|
|
public class MigrationDbContextFactory : IDesignTimeDbContextFactory<MigrationDbContext>
|
|
{
|
|
public MigrationDbContext CreateDbContext(string[] args)
|
|
{
|
|
var builder = new DbContextOptionsBuilder<MigrationDbContext>();
|
|
builder.UseSqlServer("Server=localhost;Database=MicroservicesDemo.Web;Trusted_Connection=True;MultipleActiveResultSets=true");
|
|
return new MigrationDbContext(builder.Options);
|
|
}
|
|
}
|
|
}
|