public MongoCarsManager(CarRentDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _cars = database.GetCollection <CarModel>(settings.CarsCollectionName);
        }
        public MongoBranchManager(CarRentDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _branches = database.GetCollection <BranchModel>(settings.BranchesCollectionName);
        }
        public MongoMessagesManager(CarRentDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _messages = database.GetCollection <MessageModel>(settings.MessagesCollectionName);
        }
        public MongoUsersManager(IOptions <AppSettings> appSettings, CarRentDatabaseSettings settings)
        {
            _appSettings = appSettings.Value;

            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <UserModel>(settings.UsersCollectionName);
        }
        public MongoPriceManager(CarRentDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _carsForRent = database.GetCollection <CarForRentModel>(settings.CarForRentCollectionName);
            _cars        = database.GetCollection <CarModel>(settings.CarsCollectionName);
            _carTypes    = database.GetCollection <CarTypeModel>(settings.CarTypesCollectionName);
            _branches    = database.GetCollection <BranchModel>(settings.BranchesCollectionName);
        }