public InitialDataBase(Context context) { _configurationRepository = new ConfigurationRepository(context); _configurationRowRepository = new ConfigurationRowRepository(context); _configurationValueRepository = new ConfigurationValueRepository(context); _configurationColumnRepository = new ConfigurationColumnRepository(context); _configurationColumnFillRepository = new ConfigurationColumnFillRepository(context); ParaRaiosHardCode = new ParaRaiosHardCode(); ChaveHardCode = new ChaveHardCode(); CondutorHardCode = new CondutorHardCode(); EstruturaSecundariaHardCode = new EstruturaSecundariaHardCode(); ObstaculoHardCode = new ObstaculoHardCode(); TransformadorHardCode = new TransformadorHardCode(); TopologiaHardCode = new TopologiaHardCode(); ValorPadraoHardCode = new ValorPadraoHardCode(); ClearDataBase(); if (_configurationRepository.GetAll().Count() == 0) { var listConfiguration = CreateConfiguration(); Console.WriteLine($"Quantidade de configurações criadas: {listConfiguration.Count()}"); var listConfigurationColumn = CreateConfigurationColumn(); Console.WriteLine($"Quantidade de colunas criadas: {listConfigurationColumn.Count()}"); var listConfigurationColumnFill = CreateConfigurationColumnFill(); Console.WriteLine($"Quantidade de preenchimentos criados: {listConfigurationColumnFill.Count()}"); var listConfigurationRow = CreateConfigurationRows(); Console.WriteLine($"Quantidade de linhas criadas: {listConfigurationRow.Count()}"); var listConfigurationValue = CreateConfigurationValues(); Console.WriteLine($"Quantidade de valores criadas: {listConfigurationValue.Count()}"); } }
public ConfigurationValueService(Context context) { _configurationValueRepository = new ConfigurationValueRepository(context); _configurationRowRepository = new ConfigurationRowRepository(context); _mapper = new Mapper(ConfigurationMapper.MapperConfiguration()); }