在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
https://www.cnblogs.com/hohoa/p/5839993.html
if (!ModelState.IsValid)
{
string error = string.Empty;
foreach (var key in ModelState.Keys)
{
var state = ModelState[key];
if (state.Errors.Any())
{
error = state.Errors.First().ErrorMessage;
break;
}
}
return ApiResponse(new ReturnMessage() { Status = ResultStatus.Failed, Message = error });
}
|
请发表评论