title: Trying to write CSV file, "Cannot access a closed file."
body: <p>I am trying to write a CSV file using the NuGet CsvHelper Package.  When I run the controller action I'm seeing "Cannot access a closed file."</p>
  
  <pre><code> SurveyResponseModel person = surveyResponseRepository.Get().Include(s =&gt; s.PersonModel).FirstOrDefault();
  
      using (var csv = new CsvWriter(new StreamWriter("file.csv")))
      {
          csv.Configuration.HasHeaderRecord = false;
          csv.Configuration.Delimiter = ',';
          csv.WriteRecord(person);
      }
  </code></pre>
  
  <p>I'm not sure what is causing this.  Anybody know how I can get this to write a .CSV file?</p>