InitialDbBuilder.cs 799 B

1234567891011121314151617181920212223242526272829
  1. 
  2. using ContractService.EF;
  3. namespace ContractService.SeedData
  4. {
  5. public class InitialDbBuilder
  6. {
  7. private readonly ContractServiceDbContext _context;
  8. public InitialDbBuilder(ContractServiceDbContext 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. }