asp.net core datatype.currency code example Example: .net mvc decimal displayformat currency [DataType(DataType.Currency)] public float? Cost{ get; set; }