Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Issue: Provide the parameter values as a property on ODataActionParameters rather than deriving from Dictionary [634]

$
0
0
Scenario: User is deriving from ODataActionParameters to create strongly typed properties whose data is backed by the deserialized dictionary of key-values.

Currently ODataActionParameters derives from Dictionary<string,object> and i create a custom type deriving from it ODataActionParameters and provide strongly typed properties so that users can access these at the action.

But since ODataActionParameters derives from Dictionary<string,object>, the intellisense shows up all the applicable stuff of the Dictionary too...can we instead have a property on ODataActionParameters which has the deserialized key-values..something like "ParameterValues"?

Example:

[ODataParameterBinding]
public class ExtendSupportDateParams : ODataActionParameters
{
public DateTime? NewDate
{
get
{
if (this.ParameterValues.ContainsKey("newDate"))
{
return Convert.ToDateTime(this.ParameterValues["newDate"]);
}

return null;
}
}
}

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>