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

Closed Issue: Provide a post deserialization stage while deserializing ODataActionParameters to enable users have strongly typed signatures for their parameters. [632]

$
0
0
Scenario: User wants strongly typed signature while accessing individual parameters.

My action on controller:
----------
public bool ExtendSupportDate(int boundId, ExtendSupportDateParams prms)

Custom odata action parameters:
----------
public class ExtendSupportDateParams : ODataActionParameters
{
public ExtendSupportDateParams()
{
}

public DateTime NewDate { get; set; }
}
Comments: i realized that there are several ways to achieve this: - The NewDate property in the given example can get the value from the dictionary - custom parameter binding: read the request content as odataactionparameters via odata formatter and then construct a new strongly type object and populate it.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



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