Configuration.cs 716 B

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