Hi all,
I have an API2 controller action I would like to pass several records to.
Here is the API2 Controller I would like to call. I want to call the API2 controller once and avoid several calls updating record-by-record.
[ResponseType(typeof(void))]
[Route("api/MEASURE_CAPTURE1/PutByTR_ID")]
publicIHttpActionResult PutMEASURE_CAPTUREs(List<MEASURE_CAPTURE1>serialisedMeasureList )
{
// loop through the list and update remote database here.
}
I would like to know please what changes should I make to webapi2 controller action and to MVC controller action?
Should I pass in a serialized object? For example, var serialisedMeasureList = JsonConvert.SerializeObject(RecsForTR_ID,Formatting.Indented);
Many thanks for viewing and posting answers.
Stew