Skip to content

Instantly share code, notes, and snippets.

View emadb's full-sized avatar
⌨️
coding

Emanuele DelBono emadb

⌨️
coding
View GitHub Profile
@emadb
emadb / DynamicBinderExtensions.cs
Last active August 16, 2018 11:03 — forked from thecodejunkie/DynamicModelBinder.cs
A DynamicModelBinder for NancyFx (http://nancyfx.org/). It convert your request data (form, body, querystring) into a dynamic model. This means that you don't have to create all your useless DTO. NOTE. The original version is here https://gist.github.com/thecodejunkie/5521941 (thecodejunkie). I simply add the support for deserialize the request …
public static class DynamicBinderExtensions
{
public static dynamic DynaBind(this INancyModule module)
{
return module.Bind<DynamicDictionary>();
}
}