Example #1
0
        public async Task <ServiceResponse> GeoAdd(string tableName, [FromBody] RedisGeoLocation value)
        {
            var redis    = new RedisService <string>(Factory);
            var response = await redis.GeoAdd(tableName, value.Longitude, value.Latitude, value.Key);

            return(response);
        }
Example #2
0
        public async Task TestGeoAddAsync()
        {
            LocationController controller = new LocationController(_config, _factory);

            RedisGeoLocation redisGeoLocation = new RedisGeoLocation {
                Key = "myTruck", Latitude = 36.12196, Longitude = -115.17172
            };

            var test = await controller.GeoAdd("temp", redisGeoLocation);

            Assert.True(test.Success);
        }