【发布时间】:2018-11-05 10:29:39
【问题描述】:
我正在使用 webapi2。我在模型中有一个属性是开始日期,其数据类型是日期时间。我想以“dd-mm-yyyy”格式传递日期。但如果我发送,我会收到 400 个错误请求。你能帮帮我吗?请注意,我正在使用 Fluent 验证进行模型验证。
public class Item
{
public DateTime? StartDate { get; set; }
public string Id { get; set; }
}
【问题讨论】:
-
回复说什么?
标签: datetime asp.net-web-api2 model-binding fluentvalidation value-provider