Posts

Showing posts from May, 2019

Building a RESTful API with NancyFx v2

The NancyFx v2 official release is available in Nuget since april 2019. The primary reason for upgrading NancyFx to v2 is because of its support for .NETStandard 2.0 which means you can move to .NET Core. Starting from my previous post  Building a RESTful API with NancyFx , I will show you how to upgrade to  NancyFx v2. The full   list ,  though short,  of b reaking changes can be found at: https://github.com/NancyFx/Nancy/wiki/Nancy-v2-Upgrade-Notes The most glaring breaking changes are with "Routing" and "Authentication and security". Routing Routing syntax has changed to Get("/", args => "Hello World");, these can be made async by adding the async/await keywords. To avoid changing the syntax for old routes and modules, Derek Comartin created a new module that would add back the existing routing behavior by calling the new underlying methods in the NancyModule, for more details see: https://codeopinion.com/upgrading-...