I have a complex type
public class Model
{
public double D2 { get; set; }
}
And I receive this type inside action
[HttpPost("{id}")]
public string Post(Model model)
{
return "";
}
Users want to have ability to type numbers with . (point) and , (comma) decimal separators, for example 234.245 and 234,245 are valid decimal types. But framework can't convert this numbers correctly. Is there a way to "catch" the binding for doubles to have ability to normalize symbols before converting to double?