Method ToTableResult
- Namespace
- Docfx.ResultSnippets
- Assembly
- Docfx.ResultSnippets.dll
ToTableResult<T>(IEnumerable<T>, JsonSerializerOptions?, string?)
Converts an enumerable to a pipe table result
public static string ToTableResult<T>(this IEnumerable<T> result, JsonSerializerOptions? options = null, string? defaultWhenNull = null)
Parameters
resultIEnumerable<T>some enumerable
optionsJsonSerializerOptionsoptional json serializer options
defaultWhenNullstringdefault to use when a value is null
Returns
- string
pipe table
Type Parameters
Tsome T, if its a class, each field/property becomes a column in the row