Nancy is a light-weight framework for constructing HTTP-based providers. Nancy prefers conventions over configuration and gives assist for GET, HEAD, POST, PUT, DELETE, and PATCH operations. Nancy can also be open supply beneath the MIT license. This article presents a dialogue of how we are able to use Nancy with an ASP.Net Core software.
Nancy is an internet framework and has no dependencies on System.Web or different .Net libraries. Most importantly, you aren’t constrained to adhering to the MVC sample or some other sample in case you are utilizing Nancy. Nancy is only a service endpoint that may reply to HTTP verbs. This makes Nancy a sensible choice for constructing web sites, APIs, and internet providers.
Nancy is host-agnostic. You can run it in IIS, in WCF, as a Windows Service, embedded inside an .exe file, or inside a self-hosted software. Nancy is kind of straightforward to arrange and customise. Another benefit of Nancy is its built-in assist for dependency injection. Nancy additionally gives a library that can be utilized for testing the request-response cycle simply. I’ll focus on this characteristic of Nancy in a later publish.
Create an ASP.Net Core undertaking in Visual Studio
First off, let’s create an ASP.Net Core undertaking in Visual Studio. If you don’t have Visual Studio 2019 put in in your system, you possibly can obtain it right here.
To create a brand new ASP.Net Core undertaking in Visual Studio 2019, comply with the steps given beneath.