All posts in nancy

String Indexer for Text Resources in Nancy

In the last post Build a custom Razor ViewBase in Nancy we have built a ViewBase, which allows us to access new public methods and properties in the views. The example used a dictionary containing translations. This was by far not the best use-case example, as Nancy provides built-in support for text resources. By creating a resource (.resx) file and …
read story

Build a custom Razor ViewBase in Nancy

This is a simple example on how to pass model data (in this case an anonymous dynamic) to a Razor view using Nancy modules: public IndexModule() { Get["/"] = _ => { return View["Index", new { Name = "Tobias" }]; }; } You can call this data in the view easily with @Model.Name. This post is about being able to **access common properties and helpers easily** without …
read story