Entity Framework發生『Validation failed for one or more entities. See 'EntityValidationErrors' property for more details』
catch (DbEntityValidationException ex){var entityError = ex.EntityValidationErrors.SelectMany(x => x.ValidationErrors).Select(x => x.ErrorMessage);var getFullMessage = string.Join("; ", entityError);var exceptionMessage = string.Concat(ex.Message, "errors are: ", getFullMessage);//NLogLogException(new Exception(string.Format("File : {0} {1}.", logFile.FullName, exceptionMessage), ex));}
留言
張貼留言