Configuration.cs 684 B

1234567891011121314151617181920212223242526
  1. using System.Data.Entity.Migrations;
  2. using EntityFramework.DynamicFilters;
  3. using WeApp.EF;
  4. using WeApp.SeedData;
  5. using IwbZero.EntityFramework;
  6. using IwbZero.MultiTenancy;
  7. namespace WeApp.Migrations
  8. {
  9. public sealed class Configuration : DbMigrationsConfiguration<WeAppDbContext>, IMultiTenantSeed
  10. {
  11. public TenantBase Tenant { get; set; }
  12. public Configuration()
  13. {
  14. AutomaticMigrationsEnabled = false;
  15. ContextKey = "AdminSystem-WeApp";
  16. }
  17. protected override void Seed(WeAppDbContext context)
  18. {
  19. context.DisableAllFilters();
  20. new InitialDbBuilder(context).Create();
  21. }
  22. }
  23. }