I am using Entity Framework Code First method to create my database table. The following code
creates a DATETIME
column in the database, but I want to create a DATE
column.
[DataType(DataType.Date)]
[DisplayFormatAttribute(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]
public DateTime ReportDate { get; set; }
How can I create a column of type DATE
, during table creation?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…