摘要:
catch(DbEntityValidationExceptiondbEx){foreach(varvalidationErrorsindbEx.EntityValidationErrors){foreach(varvalidationErrorinvalidationErrors.ValidationErrors){Trace.TraceInformation("Property:{0}Error:{1}",validationError.PropertyName,validationError.ErrorMessage);}}} 阅读全文