Configuration.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. ContextKey = "GreenTree.Nachtragsmanagement.Data.AppendixObjectContext";
  13. }
  14. protected override void Seed(AppendixObjectContext context)
  15. {
  16. // This method will be called after migrating to the latest version.
  17. // You can use the DbSet<T>.AddOrUpdate() helper extension method
  18. // to avoid creating duplicate seed data. E.g.
  19. //
  20. // context.People.AddOrUpdate(
  21. // p => p.FullName,
  22. // new Person { FullName = "Andrew Peters" },
  23. // new Person { FullName = "Brice Lambson" },
  24. // new Person { FullName = "Rowan Miller" }
  25. // );
  26. //
  27. }
  28. }
  29. }