Search code examples
query-stringautomapperhttpcontext

Mapping query string to object with AutoMapper


I have discovered AutoMapper recently, and I´m thinking if I could mapping HttpConext, (really query parameters) to a typed object.


Solution

  • The HttpRequest.QueryString is a NameValueCollection. So you could create some custom mapping for this like in the example here.