Reputation: 1439
I'm trying to change the property name so that I can send my asp core controller method this this json
{
"Season": 1
}
and map to my C# property
public long SeasonNumber {get; set;}
in old WCF I used to be able to map properties with
[DataMember("Season")]
is there an equivalent for asp core?
Upvotes: 1
Views: 676
Reputation: 1015
https://learn.microsoft.com/en-us/dotnet/articles/csharp/tutorials/console-webapiclient
Still is DataMember? Just need to add reference to required library. System.Runtime.Serialization.dll
Upvotes: 2