public DeviceContext(IOptions <Settings> settings) { var client = new MongoClient(settings.Value.ConnectionString); if (client != null) { _database = client.GetDatabase(settings.Value.Database); } Gpses = new GpsRepository(settings); ConnectionAttributes = new ConnectionAttributesRepository(settings); HardwareStatuses = new HardwareStatusesRepository(settings); Resets = new ResetsRepository(settings); UnparsedData = new UnparsedDataRepository(settings); Devices = new DeviceRepository(settings); }
public GpsService(GpsRepository repository) { _repository = repository; }