Namespace CsvHelper.Linq
Assembly CsvHelper.Linq.dll
Builds net10.0 netstandard2.1 netstandard2.0 net47 Its operators are instance methods, so they are chosen over the extension methods of the same names that Entity Framework Core and .NET 10's AsyncEnumerable have.
When the CSV reader runs the whole query (filters, skips and the operators that read the records it returns, such as Select and Take), the records stream; otherwise the records that the reader returns are read into memory first, and the rest of the query runs on them.
Methods
Whether every result matches a condition; reading stops at the first that does not.
Parameters Returns
Task <bool >true when all results match, or there are none.
Exceptions
View source
Whether the query has any result; reading stops at the first.
Parameters Returns
Task <bool >true when there is a result.
View source
Whether any result matches a condition; reading stops at the first that does.
Parameters Returns
Task <bool >true when a result matches.
Exceptions
View source
Counts the results; the reader counts the records without reading their members when it can.
Parameters Returns
Task <int >The number of results.
View source
Counts the results that match a condition.
Parameters Returns
Task <int >The number of results that match.
Exceptions
View source
The result at an index; the reader skips the records before it without reading their members when it can.
Parameters
indexint The 0-based index. Returns
Task <T >The result at index.
Exceptions
View source
Runs any other operator that returns a single value, such as q => q.Sum(o => o.Total) or q => q.Max(o => o.Placed), reading the CSV asynchronously.
Type parameters
TResultThe type of the value. Parameters Returns
Exceptions
View source
Parameters Returns
Exceptions
View source
The first result that matches a condition.
Parameters Returns
Task <T >The first result that matches.
Exceptions
View source
The first result, or the default of T when there is none.
Parameters Returns
Task <T ?>The first result, or the default.
View source
The first result that matches a condition, or the default of T when none does.
Parameters Returns
Task <T ?>The first result that matches, or the default.
Exceptions
View source
Runs the query and calls action with each result.
Parameters actionAction <T >What to do with each result. Returns
Task A task that completes after the last result.
Exceptions
View source
Runs the query, reading the CSV asynchronously.
Parameters Returns
IAsyncEnumerator <T >An enumerator of the results; disposing it closes the sources it opened.
View source
Parameters Returns
Exceptions
View source
The last result, or the default of T when there is none.
Parameters Returns
Task <T ?>The last result, or the default.
View source
Counts the results, as a long .
Parameters Returns
Task <long >The number of results.
View source
Counts the results that match a condition, as a long .
Parameters Returns
Task <long >The number of results that match.
Exceptions
View source
Parameters Returns
Exceptions
View source
The only result that matches a condition.
Parameters Returns
Task <T >The only result that matches.
Exceptions
View source
The only result, or the default of T when there is none.
Parameters Returns
Task <T ?>The only result, or the default.
Exceptions
View source
The only result that matches a condition, or the default of T when none does.
Parameters Returns
Task <T ?>The only result that matches, or the default.
Exceptions
View source
Runs the query and returns its results in an array.
Parameters Returns
View source
Runs the query and returns its results in a list.
Parameters Returns
View source