CSV Helper
The AxisEndpoints.Extensions.CsvHelper package adds typed CSV import and export to AxisEndpoints endpoints, backed by CsvHelper.
Installation
Section titled “Installation”dotnet add package AxisEndpoints.Extensions.CsvHelperRegister the extension services in Program.cs:
using AxisEndpoints.Extensions;using AxisEndpoints.Extensions.CsvHelper;
builder.Services.AddAxisEndpoints();builder.Services.AddAxisEndpointsCsvHelper(); // registers CsvBindingExceptionFilterNext steps
Section titled “Next steps”- CSV Import — parse incoming CSV data into typed rows
- CSV Export — stream typed rows as a CSV download
- Row Validation — validate each row with DataAnnotations
- Class Map — customize column-to-property mapping