The most important here is - what DBMS you have? MSSQL? SQLite? MariaDB?
Your DBMS doesn't know what "DateTime" is. You should map this data type, for example:
[Column(TypeName("data-type-in-your-dbms"))]
public DateTime dateOfBirth {get;set;}
- you can store your datetime as ints (for example in unix timestamp) like this: public int dateOfBirthTimestamp {get;set;} //this one is written to db
public DateTime dateOfBirth
{
get { return DateTime.FromTimestamp(dateOfBirthTimestamp); }
set {dateOfBirthTimestamp = value.ToTimeStamp(); }
}
(this is pseudocode, so you should read about timestamp)
or the best - try using DateTimeOffset - but this one may not be provided in for example SQLite.