Exemplo n.º 1
0
 public IEnumerable <OAUnitDefinition> GetAllUnits()
 {
     using (var context = new ConfigurationToolContext())
     {
         var repository = new OAUnitDefinitionRepository(context);
         return(repository.GetAll());
     }
 }
        //Gets Procescells, Units, Bins & ParameterDefinitions
        public FactoryConfig GetFactoryConfig()
        {
            using (var context = new ConfigurationToolContext())
            {
                var procescellRepository          = new ProcessCellRepository(context);
                var binRepository                 = new BinRepository(context);
                var parameterDefinitionRepository = new ParameterDefinitionRepository(context);
                var OAUnitDefinitionRepository    = new OAUnitDefinitionRepository(context);
                var factoryConfig                 = new FactoryConfig();

                factoryConfig.ParameterDefinitions = parameterDefinitionRepository.GetAll();
                factoryConfig.Procescells          = procescellRepository.GetAll();
                factoryConfig.Bins = binRepository.GetAll();
                factoryConfig.OAUnitDefinitions = OAUnitDefinitionRepository.GetAll();

                return(factoryConfig);
            }
        }