I have a simple application with asp.net mvc c# and I use EF code first.
I have a class "Student" that has a property of type decimal and others of type int. I dont undrestand why the decimal property will be not null without any data annotation?
Another problem is that when i run my application, the text box with decimal property retrieves a value of 170,6 but when I submit it, it shows an error which says that 170,6 is not a valid value and I have to change it to 170.6 to be able to submit.
public class Student
{
public int StudentID { get; set; }
public string StudentName { get; set; }
public DateTime? DateOfBirth { get; set; }
public byte[] Photo { get; set; }
public decimal Height { get; set; }
public int Weight { get; set; }
public int changement { get; set; }
public Grade Grade { get; set; }
}
public class Grade
{
public int GradeId { get; set; }
public string GradeName { get; set; }
public string Section { get; set; }
public ICollection<Student> Students { get; set; }
}