Configuration.cs 766 B

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