Q:

Can Date attribute allow null value?

I have created a Model file for my MVC project that contains the following:
Public Class Player

    Public Property FirstName As String
    Public Property LastName As String
    Public Property GoesBy As String
    Public Property Birthdate As Date

End Class

I didn't mark the Birthdate field as a Required field, but it won't accept nulls.  How can I add a validation or something else to allow for nulls?  Or is that not possible and I have to just insert 1900-01-01 or something similar?

A:

Just make your property Public Property Birthdate As Date as nullable like shown below:
Public Property Birthdate As Nullable(Of Date)

and just make your database field which accepts Birthdate as nullable so that it can accept null values also.

