Skip to content

Commit

Permalink
Trying out new conversion method
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl committed Feb 14, 2020
1 parent c5246af commit 18ce126
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions TodoBasic/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ static async Task GetAllAsync(HttpContext context)

static async Task GetAsync(HttpContext context)
{
if (!context.Request.RouteValues.TryGet("id", out int id))
var (id, ok) = context.Request.RouteValues.Get<int>("id");
if (!ok)
{
context.Response.StatusCode = 400;
return;
Expand Down Expand Up @@ -60,7 +61,8 @@ static async Task PostAsync(HttpContext context)

static async Task DeleteAsync(HttpContext context)
{
if (!context.Request.RouteValues.TryGet("id", out int id))
var (id, ok) = context.Request.RouteValues.Get<int>("id");
if (!ok)
{
context.Response.StatusCode = 400;
return;
Expand Down
2 changes: 1 addition & 1 deletion TodoBasic/Todos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TodoBasicWithAuth/TodoBasicWithAuth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.1" />
Expand Down
2 changes: 1 addition & 1 deletion TodoWithControllers/TodoWithControllers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.1" />
Expand Down
2 changes: 1 addition & 1 deletion TodoWithDI/TodoWithDI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TodoWithNoRequestDelegate/TodoWithNoRequestDelegate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TodoWithRoutes/TodoWithRoutes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TodoWithScopedApi/TodoWithScopedApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FeatherHttp" Version="0.1.56-alpha.gd7c17002e3" />
<PackageReference Include="FeatherHttp" Version="0.1.58-alpha.g44fef05de5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
</ItemGroup>
Expand Down

0 comments on commit 18ce126

Please sign in to comment.