public Product CreateProduct([FromBody] Product_Xml xmlInput)
 {
     // To show that we selected the correct method (and not just the
     // correct input formatter), produce method-specific output.
     xmlInput.SampleString = "Read from XML: " + xmlInput.SampleString;
     return(xmlInput);
 }
示例#2
0
 public Product CreateProduct([FromBody] Product_Xml xmlInput)
 {
     return(xmlInput);
 }
 public IActionResult CreateProductMultiple(Product_Xml jsonInput)
 {
     return(Content("ConsumesAttribute_PassThrough_Product_Xml"));
 }