Код: Выделить всё
public class TimeStampDTO
{
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd HH:mm:ss}", ApplyFormatInEditMode = true)]
[DataType(DataType.DateTime)]
public DateTime Timestamp { get; set; }
}
Код: Выделить всё
{
"timestamp": "2024-09-27T09:31:42.291Z"
}
Код: Выделить всё
{
"timestamp": "2024-09-27 09:31:42"
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... dto-and-ef
Мобильная версия