InitialDbBuilder.cs 746 B

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