Asp.net core 2.0 comma and decimal point

I tried to attempt a basic Core 2 project using only the model:

public class Bilance 
{ 
    [Key] 
    public int Id { get; set; } 

    [Required] 
    public decimal Amount{ get; set; } // (sql 18,2) 
}

I used this special model binding to use a comma as a decimal separator, but it does not work. ( Aspnet Core Decimal binding does not work on non-English culture )

Works with several numbers (123 456) with others no (11.50 ... 1520.77)

could you help me? Thanks

+4
source share

Source: https://habr.com/ru/post/1685689/


All Articles