Configuration.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Data.Entity;
  3. using System.Data.Entity.Migrations;
  4. using System.Linq;
  5. namespace GreenTree.Nachtragsmanagement.Data.Migrations
  6. {
  7. internal sealed class Configuration : DbMigrationsConfiguration<AppendixObjectContext>
  8. {
  9. public Configuration()
  10. {
  11. AutomaticMigrationsEnabled = true;
  12. AutomaticMigrationDataLossAllowed = true;
  13. ContextKey = "GreenTree.Nachtragsmanagement.Data.AppendixObjectContext";
  14. }
  15. protected override void Seed(AppendixObjectContext 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. E.g.
  20. //
  21. // context.People.AddOrUpdate(
  22. // p => p.FullName,
  23. // new Person { FullName = "Andrew Peters" },
  24. // new Person { FullName = "Brice Lambson" },
  25. // new Person { FullName = "Rowan Miller" }
  26. // );
  27. //
  28. }
  29. }
  30. }