public RegistrationService(IVehicleTrackerDbConfig config) { var client = new MongoClient(config.ConnectionString); var database = client.GetDatabase(config.DatabaseName); _registrationInfo = database.GetCollection <RegistrationInfo>(config.VehicleRegistrationCollectionName); }
public TrackingService(IVehicleTrackerDbConfig config) { var client = new MongoClient(config.ConnectionString); var database = client.GetDatabase(config.DatabaseName); _trackingHistory = database.GetCollection <TrackingHistory>(config.VehicleTrackingCollectionName); }