DataMember Attribute is not honored in dotnet core 3.0
问题 I created a sample dotnet core 3.0 Web API project and did the following changes, Create a Model class TestData using System.Runtime.Serialization; namespace WebApplication17.Models { [DataContract] public class TestData { [DataMember(Name = "testaction")] public string Action { get; set; } } } Then I made changes in controller WeatherForecastController , to add a post endpoint [HttpPost("package/{packageName}/version/{version}")] public void Post(string packageName, string version, [FromBody