CodeFirstInitializer.cs 647 B

123456789101112131415161718192021222324
  1. using Azylee.DB.SQLite.Engine;
  2. using SQLite.CodeFirst;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data.Entity;
  6. using System.Linq;
  7. using System.Text;
  8. namespace Azylee.DB.SQLite.Configs
  9. {
  10. public class MyDbInitializer : SqliteCreateDatabaseIfNotExists<SuperDB>//SqliteDropCreateDatabaseAlways
  11. {
  12. public MyDbInitializer(string connectionString, DbModelBuilder modelBuilder)
  13. : base(modelBuilder)
  14. {
  15. }
  16. protected override void Seed(SuperDB context)
  17. {
  18. //context.Set<Files>().Add(new Files { FileName = "123" });
  19. base.Seed(context);
  20. }
  21. }
  22. }