Last post Apr 30, 2014 06:54 PM by Ivy601
Apr 25, 2014 10:37 AM|Ivy601|LINK
<div class="post-text" itemprop="description">
I have an action method for Put operation inside a controller(for asp.net web api). And the signature of that method is like
public void PutExpand( MyClass myClass, int id)
now for the routing purpose I'm wondering what should my url look like in order to access the above mentioned controller action and how should I model bind complex type(Myclass myClass) for the routing?
All suggestion will be highly appreciated.
Apr 27, 2014 02:38 PM|damienBod|LINK
You could do it like this:
public void PutExpand([FromBody] MyClass myclass, int id)
Your then serialize your MyClass object as content.
Apr 30, 2014 06:54 PM|Ivy601|LINK
Thanks a lot Damien