Can i control how ToCsv() Creates text?

I’m using toCsv() to serialize a list that is imported into MySQL using the “load data local infile” command

C#

var hlist = new List<>();
System.IO.File.WriteAllText($“/tmp/page-{p}.csv”,hlist.ToCsv());

In MySQL

load data local infile ‘/tmp/page-0.csv’
into table LocalSyncHeaders
enclosed by ’ " ’
FIELDS TERMINATED BY ‘,’
LINES TERMINATED BY ‘\n’;

The problems are:

1 - the field titles get inserted into the db as the first row
2 - it expects fields to be enclosed in double-quotes and without it stops importing

Clearly I can control some of this in MySQL.

Question:

1 - Is there any way to control ToCsv() so it can better match what MySQL expects.

2 - I see that there is an option for

ServiceStack.Text.CsvConfig.CustomHeadersMap

are there any other control points for csv serialization?

The CsvConfig class contains the only customizable features for CSV where you can Customize the Headers/Columns that are generated as seen in CustomHeaderTests.cs or you can omit headers for a Type with:

CsvConfig<Table>.OmitHeaders = true;

The only other Customization available is what’s available in the ServiceStack.Text configuration where it uses JSV Format to render CSV fields.