Skip to content

Commit 3b31635

Browse files
committed
Upgrade to .NET 5
1 parent 5c1e49d commit 3b31635

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
Redis GEO is a simple example showing how to make use of [Redis 3.2.0 new GEO capabilities](http://antirez.com/news/104):
44

5-
[![](https://raw.githubusercontent.com/ServiceStack/Assets/master/img/livedemos/redis-geo/redisgeo-screenshot.png)](http://redisgeo.netcore.io)
6-
7-
> Live Demo: http://redisgeo.netcore.io
5+
![](https://raw.githubusercontent.com/ServiceStack/Assets/master/img/livedemos/redis-geo/redisgeo-screenshot.png)
86

97
If Redis hasn't already cemented itself as the venerable Swiss-Army-Knife component present in
10-
[many high-performance server solutions](http://techstacks.io/tech/redis), the latest 3.2.0 release has made
11-
it even more versatile and enhanced it with new [GEO powers](http://redis.io/commands/geoadd).
8+
[many high-performance server solutions](https://techstacks.io/tech/redis), the latest 3.2.0 release has made
9+
it even more versatile and enhanced it with new [GEO powers](https://redis.io/commands/geoadd).
1210

1311
Aiming for the simplest possible useful demonstration of this new functionality, Redis GEO App lets you
1412
click on anywhere in the U.S. to find the list of nearest cities within a given radius.
@@ -106,7 +104,7 @@ This just parses the `US.txt` file in our Web Applications
106104
folder and extracts the **state** which we'll use as the key for our Redis GEO sorted set and populate
107105
it with the **longitude** and **latitude** of each **city**, skipping any duplicates. The script also
108106
imports the dataset for each state in separate batches using
109-
[GEOADD](http://redis.io/commands/geoadd) multi argument API.
107+
[GEOADD](https://redis.io/commands/geoadd) multi argument API.
110108

111109
### Implement the FindGeoResults Service
112110

@@ -129,7 +127,7 @@ That's the only DTO our App needs which returns a `List<RedisGeoResult>`. Implem
129127
[RedisGeoServices](https://github.com/NetCoreApps/redis-geo/blob/master/src/RedisGeo.ServiceInterface/RedisGeoServices.cs)
130128
is then just a matter fulfilling the above contract by delegating our populated Request DTO properties to the
131129
`IRedisClient.FindGeoResultsInRadius()` Redis Client API which itself just calls
132-
[GEORADIUS](http://redis.io/commands/georadius) and returns its results:
130+
[GEORADIUS](https://redis.io/commands/georadius) and returns its results:
133131

134132
```csharp
135133
public class RedisGeoServices : Service
@@ -159,7 +157,7 @@ which is just a jQuery App that just consists of the following markup:
159157

160158
<div id="instructions">
161159
Click on Map to find nearest cities using
162-
<a href="http://redis.io/commands/georadius">Redis GEO</a>
160+
<a href="https://redis.io/commands/georadius">Redis GEO</a>
163161
</div>
164162

165163
<div id="info">

src/RedisGeo/RedisGeo.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>net5</TargetFramework>
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
<AssemblyName>RedisGeo</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -20,7 +20,6 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Microsoft.AspNetCore.App" />
2423
<PackageReference Include="ServiceStack" Version="5.*" />
2524
<PackageReference Include="ServiceStack.Interfaces" Version="5.*" />
2625
<PackageReference Include="ServiceStack.Text" Version="5.*" />

src/RedisGeo/Startup.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNetCore.Http;
33
using Microsoft.AspNetCore.Builder;
44
using Microsoft.AspNetCore.Hosting;
5-
using Microsoft.Extensions.Logging;
5+
using Microsoft.Extensions.Hosting;
66
using Microsoft.Extensions.Configuration;
77
using Microsoft.Extensions.DependencyInjection;
88
using ServiceStack;
@@ -22,10 +22,8 @@ public void ConfigureServices(IServiceCollection services)
2222
}
2323

2424
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
25-
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
25+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
2626
{
27-
loggerFactory.AddConsole();
28-
2927
if (env.IsDevelopment())
3028
{
3129
app.UseDeveloperExceptionPage();

src/RedisGeo/wwwroot/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h3>Redis GEO Example</h3>
5252

5353
<div id="instructions">
5454
Click on Map to find nearest cities using
55-
<a href="http://redis.io/commands/georadius">Redis GEO</a>
55+
<a href="https://redis.io/commands/georadius">Redis GEO</a>
5656
</div>
5757

5858
<div id="info">

0 commit comments

Comments
 (0)