<code class="lang-c">catch (System.Data.Entity.Validation.DbEntityValidationException ex) { foreach (System.Data.Entity.Validation.DbEntityValidationResult Item in ex.EntityValidationErrors) { foreach (var ValidationErrorsItem in Item.ValidationErrors) { Console.WriteLine(string.Format("PropertyName = {0},ErrorMessage = {1}", ValidationErrorsItem.PropertyName, ValidationErrorsItem.ErrorMessage)); } } }</code>得到错误信息
时段 | 个数 |
---|---|
{{f.startingTime}}点 - {{f.endTime}}点 | {{f.fileCount}} |