Last post Jun 25, 2020 10:29 PM by email@example.com
Jun 25, 2020 10:29 PMfirstname.lastname@example.org|LINK
Note 1: This is for deserialization, not serialization.
Note 2: I have a class named Template. So this is not a unique name, it's a duplicate name.
I have a client calling my ASP.NET Web Api2 REST app. We have changed the API substantially from version 1 to version 2.
The passed in object is a Template. I want to keep it that both version1 and version2 use this name from the client side. But that means on the server side I want to have a class TemplateV1 for the old v1 calls.
public class TemplateV1
[Obsolete ("Use v2/document (which is only async) instead.")]
[ApiExplorerSettings(IgnoreApi = true)]
public IHttpActionResult ReportsV1([FromBody] TemplateV1 v1template)
I looked up the raw XML in he debugger in the request and it's as expected:
but that didn't seem to work. Is there something else I need to do the get it to map <Template> to the class TemplateV1 and inside the above may Datasource to <DayasourceV1>. And a big problem I think is I do have classes named Template and Datasource.
Asked on StackOverflow (no answers).