In our project there is a code style that force us to use model with property name like camelcase-style
public class MyModelClass {
public int CountryId { get; set; }
public int CountryName { get; set; }
}
But service, that invoke out REST-API transfer HTTP-body with parameters like
country_id
and country_name
. And I can't map the http-query to my model in controller action. Is there in ASP.NET CORE MVC way to map properties like that
public class MyModelClass {
[SpecialAttribute("country_id")]
public int CountryId { get; set; }
[SpecialAttribute("country_name")]
public int CountryName { get; set; }
}
Or is there another way to achieve this?