sergeyt / Owin.Routing

Simple routing for OWIN applications inspired by express.js
MIT License
12 stars 4 forks source link

README does not match current version from NuGet #10

Closed tidyui closed 9 years ago

tidyui commented 9 years ago

The "getting started" docs in the README doesn't seem to match the current version. I had to replace the following code:

app.Route("docs/{collection}")
    .Get(async (ctx, data) =>
    {
        var name = Convert.ToString(data.Values["collection"]);
        await ctx.Response.WriteAsync(name);
    });

with:

app.Route("docs/{collection}")
    .Get(async (ctx) =>
    {
        var name = var name = ctx.GetRouteValue<string>("name"); 
        await ctx.Response.WriteAsync(name);
    });
sergeyt commented 9 years ago

@tidyui thanks for info, fixed!