Pergunta

I'm new to Nancy,

I see I can work with the query string using Request.Query.Foo and check for the existence of the value via Request.Query.Foo.HasValue. If I try to read Foo and it does not exist, does Nancy return null or does it throw?

Foi útil?

Solução

Foo will be of type DynamicDictionaryValue, so you will actually need to access the Value property to use it, just as you would a Nullable type. It won't simply throw an error for referencing Request.Query.Foo unless you try to do something with the .Value and it is null.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top