c# - Multiple Posted Types asp.net 5 MVC 6 API -


i can use [frombody] single type , there way use multiple?

from searching , reading i've done there not way, don't know if way has been added in mvc 6.

if not, best start custom way.

what should researching , looking best method or place hook in before model binding can include own method?

the best way create composite wrapper:

public class wrapper {    public modela { get; set; }     public modelb b { get; set; } } 

put wrapper in parameter list , mark [frombody]. can't use attribute more once because of contents of body assumed match parameter type.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -