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.
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.