InitialDbBuilder.cs 760 B

123456789101112131415161718192021222324252627282930
  1. 
  2. using WeApp.EF;
  3. namespace WeApp.SeedData
  4. {
  5. public class InitialDbBuilder
  6. {
  7. private readonly WeAppDbContext _context;
  8. public InitialDbBuilder(WeAppDbContext context)
  9. {
  10. _context = context;
  11. }
  12. public void Create()
  13. {
  14. //new DefaultViewAndSpCreate(_context).Create();
  15. //new DefaultTypesCreator(_context).Create();
  16. //new DefaultDataCreator(_context).Create();
  17. //new InitialUserAndFun(_context).Create();
  18. new DefaultSettingsCreator(_context).Create();
  19. //new DefaultStatesCreator(_context).Create();
  20. //new DefaultNotificationsCreator(_context).Create();
  21. _context.SaveChanges();
  22. }
  23. }
  24. }