WebAPI Selfhost: Can’t bind multiple parameters to the request’s content

Web Api doesn’t support multiple [FromBody] params I think. But you can use Api model, to passing more parameters to your api action.:

public class YourApiModel
{
    public int A{ get; set; }

    public int B { get; set; }

    //...other properties    
}

After that, you can simply use this in your API controller Test:

    // POST: api/test
    public IHttpActionResult Post([FromBody] YourApiModel model)
    {
        //do something
    }

Hope it help.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)