Example #1
0
        public Task WriteEntityAsync(string fileLoc, TGetModel entity)
        {
            _logger.LogDebug($"Attempting to write entity to {fileLoc}...");

            CsvFile file = CsvFile.FromFileLocation(fileLoc);

            file.HeadLine = GetHeadLine();
            file.BodyLines.Add(GetBodyLine(entity));

            return(_csvWriter.Write(file));
        }
        public void Write(params string[] columns)
        {
            if (_csvFileWriter == null)
            {
                throw new CSVFileNotOpenException();
            }

            _csvFileWriter.Write(columns);
        }