예제 #1
0
 public AddressService(
     IAddressRepository addressRespository,
     IUserRepository userRepository,
     IGoogleMapsApi googleMapsApi)
 {
     _addressRespository = addressRespository;
     _userRepository     = userRepository;
     _googleMapsApi      = googleMapsApi;
 }
        public UserRepository(MongoConnection mongoConnection, IGoogleMapsApi googleMapsApi, ICacheService <GoogleGeocodeResult> cacheGoogleGeocodeService) : base(mongoConnection)
        {
            _googleMapsApi             = googleMapsApi;
            _cacheGoogleGeocodeService = cacheGoogleGeocodeService;
            var keys = Builders <User> .IndexKeys.Geo2DSphere(x => x.Location);

            var model = new CreateIndexModel <User>(keys);

            BaseCollection.Indexes.CreateOne(model);
        }
예제 #3
0
 public AddressesService(IRepository <Address> repository,
                         IValidator <Address> validator,
                         IGoogleMapsApi googleMapsApi,
                         IConfiguration configuration,
                         ICrudService <User> userService,
                         IStringLocalizer <SharedResource> localizer)
     : base(repository, validator)
 {
     _googleMapsApi = googleMapsApi;
     _configuration = configuration;
     _userService   = userService;
     _localizer     = localizer;
 }