private void ReportRevEngErrors(EfCoreReverseEngineerResult revEngResult, string missingProviderPackage) { var errors = new StringBuilder(); foreach (var entityError in revEngResult.EntityErrors) { errors.Append($"Table: {entityError.Key}{Environment.NewLine}"); errors.Append($"Error: {entityError.Value}{Environment.NewLine}"); } if (revEngResult.EntityErrors.Count == 0) { errors.Insert(0, "Model generated successfully." + Environment.NewLine); } else { errors.Insert(0, "The following issues were encountered:" + Environment.NewLine); } if (!string.IsNullOrEmpty(missingProviderPackage)) { errors.AppendLine(); errors.AppendFormat("The \"{0}\" NuGet package was not found in the project - it must be installed in order to build.", missingProviderPackage); } EnvDteHelper.ShowMessage(errors.ToString()); }
private string ReportRevEngErrors(EfCoreReverseEngineerResult revEngResult, string missingProviderPackage) { var errors = new StringBuilder(); if (revEngResult.EntityErrors.Count == 0) { errors.Append("Model generated successfully." + Environment.NewLine); } else { errors.Append("Please check the output window for errors" + Environment.NewLine); } if (revEngResult.EntityWarnings.Count > 0) { errors.Append("Please check the output window for warnings" + Environment.NewLine); } if (!string.IsNullOrEmpty(missingProviderPackage)) { errors.AppendLine(); errors.AppendFormat("The \"{0}\" NuGet package was not found in the project - it must be installed in order to build.", missingProviderPackage); } return(errors.ToString()); }