Beispiel #1
0
        // pass in inputFileType rather get from TEntity, is to allow TEntity to be EF proxy type, or anonymous type
        public void SaveContent <TEntity>(IEnumerable <TEntity> entities, int runInstanceId, InputFileType inputFileType)
        {
#warning move encoding out
            using (var textWriter = _contentStorage.GetDestnationWriter(runInstanceId, inputFileType, ASCIIEncoding.ASCII))
            {
                var csvWriter = new CsvWriter(textWriter);
                csvWriter.WriteRecords(entities);
            }
        }