public static DateTime ToDateTime(this string value) { if (!string.IsNullOrWhiteSpace(value)) { return(TimestampConverter.FromDatabase(value)); } return(DateTime.Now); }
public static DateTime?ToNullableDateTime(this string value) { if (!string.IsNullOrWhiteSpace(value)) { return(TimestampConverter.FromDatabase(value)); } return(null); }