using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Webhooks.API.Model; namespace Webhooks.API.Infrastructure { public class WebhooksContext : DbContext { public WebhooksContext(DbContextOptions options) : base(options) { } public DbSet Subscriptions { get; set; } } public class WebhooksContextDesignFactory : IDesignTimeDbContextFactory { public WebhooksContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder() .UseSqlServer("Server=.;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;Integrated Security=true"); return new WebhooksContext(optionsBuilder.Options); } } }