}//end static method public static string GetErrorMessage(this IOperationResult result, string description) { StringBuilder msg = new StringBuilder(); result.ValidationErrors.ForEach(error => msg.AppendLine(string.Format("[{0}]主键:{1},错误:{2}", description, error.BillPKID, error.Message))); result.GetFatalErrorResults().ForEach(error => msg.AppendLine(string.Format("[{0}]主键:{1},错误:{2}", description, error.BillPKID, error.Message))); return(msg.ToString()); }//end static method