public CosemLogicalDeviceController(ICosemLogicalDeviceRepository r, IDeviceTypeRepository dtr)
 {
     //  for tests over real database
     //  does not work...
     //db = new SGMasterBaseEntities("metadata=res://*/Models.SGMasterBase.csdl|res://*/Models.SGMasterBase.ssdl|res://*/Models.SGMasterBase.msl;provider=System.Data.SqlClient;provider connection string=\"Data Source=.\\SQLEXPRESS;Initial Catalog=SGMasterBase;Integrated Security=True;MultipleActiveResultSets=True;Application Name=EntityFramework\"");
     SetRepository(r, dtr, null);
 }
 private void SetRepository(ICosemLogicalDeviceRepository r, IDeviceTypeRepository dtr,
                            SGMasterBaseEntities e)
 {
     _cosemLogicalDeviceRepository = r;
     _cosemLogicalDeviceRepository.SetEntities(e);
     _deviceTypeRepository = dtr;
     _deviceTypeRepository.SetEntities(e);
 }
Esempio n. 3
0
 private void SetRepository(ICosemObjectRepository r, ICosemLogicalDeviceRepository clr,
                            IDeviceTypeRepository dtr, ICosemClassRepository ccr,
                            ICosemAttributeDataTypeRepository cadtr, SGMasterBaseEntities e)
 {
     _cosemObjectRepository = r;
     _cosemObjectRepository.SetEntities(e);
     _cosemLogicaDeviceRepository = clr;
     _cosemLogicaDeviceRepository.SetEntities(e);
     _deviceTypeRepository = dtr;
     _deviceTypeRepository.SetEntities(e);
     _cosemClassRepository = ccr;
     _cosemClassRepository.SetEntities(e);
     _cosemAttributeDataTypeRepository = cadtr;
     _cosemAttributeDataTypeRepository.SetEntities(e);
 }
Esempio n. 4
0
 private void SetRepository(IDeviceLogicalDeviceRepository r, IDeviceRepository dr, IDeviceTypeRepository dtr,
                            ICosemLogicalDeviceRepository cor, IDeviceObjectRepository dor,
                            SGMasterBaseEntities e)
 {
     _deviceLogicalDeviceRepository = r;
     _deviceLogicalDeviceRepository.SetEntities(e);
     _deviceRepository = dr;
     _deviceRepository.SetEntities(e);
     _deviceTypeRepository = dtr;
     _deviceTypeRepository.SetEntities(e);
     _cosemLogicalDeviceRepository = cor;
     _cosemLogicalDeviceRepository.SetEntities(e);
     _deviceObjectRepository = dor;
     _deviceObjectRepository.SetEntities(e);
 }