Skip to main content
A newer version of this page is available. .

Date and Time Properties in Entity Framework

The example below illustrates how to implement Date and Time Properties in an Entity Framework Code-First class.

public DateTime DateTimeProperty { get; set; }
public DateTime? DateTimeNullableProperty { get; set; }
public TimeSpan TimeSpanProperty { get; set; }