Exemplo n.º 1
0
 public DeviceAttributeController(IDeviceAttributeRepository r, IDeviceRepository dr, IDeviceTypeRepository dtr,
                                  ICosemObjectRepository cor, ICosemAttributeValueRepository car)
 {
     //  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, dr, dtr, cor, car, null);
 }
Exemplo n.º 2
0
 private void SetRepository(IDeviceAttributeRepository r, IDeviceRepository dr, IDeviceTypeRepository dtr,
                            ICosemObjectRepository cor, ICosemAttributeValueRepository car,
                            SGMasterBaseEntities e)
 {
     _deviceAttributeRepository = r;
     _deviceAttributeRepository.SetEntities(e);
     _deviceRepository = dr;
     _deviceRepository.SetEntities(e);
     _deviceTypeRepository = dtr;
     _deviceTypeRepository.SetEntities(e);
     _cosemObjectRepository = cor;
     _cosemObjectRepository.SetEntities(e);
     _cosemAttributeRepository = car;
     _cosemAttributeRepository.SetEntities(e);
 }
Exemplo n.º 3
0
 public DeviceAttributeController(IMapper mapper, IDeviceAttributeRepository repo, IAuthority auth)
 {
     _mapper = mapper;
     _repo   = repo;
     _auth   = auth;
 }