Configuration.cs 931 B

12345678910111213141516171819202122232425262728
  1. namespace ShwasherSys.Migrations
  2. {
  3. using global::EntityFramework.DynamicFilters;
  4. using ShwasherSys.Migrations.SeedData;
  5. using System;
  6. using System.Data.Entity;
  7. using System.Data.Entity.Migrations;
  8. using System.Linq;
  9. internal sealed class Configuration : DbMigrationsConfiguration<ShwasherSys.EntityFramework.ShwasherDbContext>
  10. {
  11. public Configuration()
  12. {
  13. AutomaticMigrationsEnabled = false;
  14. ContextKey = "IwbAdminSystem";
  15. }
  16. protected override void Seed(ShwasherSys.EntityFramework.ShwasherDbContext context)
  17. {
  18. // This method will be called after migrating to the latest version.
  19. // You can use the DbSet<T>.AddOrUpdate() helper extension method
  20. // to avoid creating duplicate seed data.
  21. context.DisableAllFilters();
  22. new InitialHostDbBuilder(context).Create();
  23. }
  24. }
  25. }