I have an Asp.NET MVC controller action which receives a DTO which in turn contains a nullable decimal property.
e.g.
[DataContact]
public class MyDTO
{
//other properties
[DataMember]
public decimal? SomeProp {get;set;}
}
and my action looks like this:
public JsonResult SaveMyDTO(MyDTO dto)
{...
I can see that the js client passes the correct json data, there are values set for "SomeProp" however, the property is not set when deserialized on the server, other properties are, but not the nullable decimal prop.
What is the easiest way to make it work? convert the property to string?