Open Arithmomaniac opened 6 years ago
Currently, method give little detail on error.
A more robust solution would do something like this:
private static string GenerateMessage(string globalErrorMessage, List<Result<T>> failureItems) { var sb = new StringBuilder(globalErrorMessage ?? "One or more results failed."); foreach (var message in failureItems.Select(x => $"- {x.Message}")) sb.AppendLine().Append(message); return sb.ToString(); }
Sounds valuable for the whole ORM error handling, It will be applied by me. Thanks!
Currently, method give little detail on error.
A more robust solution would do something like this: