using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; namespace BuildingBlocks.PersistMessageProcessor.Data; public class DesignTimeDbContextFactory : IDesignTimeDbContextFactory { public PersistMessageDbContext CreateDbContext(string[] args) { var builder = new DbContextOptionsBuilder(); builder.UseSqlServer( "Data Source=.\\sqlexpress;Initial Catalog=PersistMessageDB;Persist Security Info=False;Integrated Security=SSPI;TrustServerCertificate=True"); return new PersistMessageDbContext(builder.Options); } }