title: LINQ how to generate csv file section
body: <p>I got the problem generating csv file based on the section. I currently using LinqToCsv dll to generate the file. How do I generate the file by section. Please help. Thanks.</p>
  
  <p>Currenly I have 3 section</p>
  
  <pre><code>Header Section
  Detail Section 
  Footer Section
  </code></pre>
  
  <p>Here my codes.</p>
  
  <pre><code>TTMSEntities DB = new TTMSEntities();
  
  CsvFileDescription outputFileDescription = new CsvFileDescription();
  outputFileDescription.NoSeparatorChar = false;
  outputFileDescription.FirstLineHasColumnNames = true;
  outputFileDescription.FileCultureName = "en-US";
  
  List&lt;HeaderRec&gt; list1 = new List&lt;HeaderRec&gt;();
  HeaderRec header = new HeaderRec();
  
  header.RecordType = "";
  header.RetailerID = "";
  header.FileDate = "";
  header.FileSequence = "";
  header.LastTransRef = "";
  list1.Add(header);
  
  var Data = (from p in DB.TT_TNG_KFC_TRANSACTION_UPLOAD
              select new DetailRec
              {
                  RecordType = "D",
                  TransIDType  ="AA"
              });
  
  List&lt;FooterRec&gt; list2 = new List&lt;FooterRec&gt;();
  FooterRec footer = new FooterRec();
  
  footer.RecordType = "T";
  footer.TotalAmount = "100";
  list2.Add(footer);
  
  CsvContext cc = new CsvContext();
  
  cc.Write(Data, "TestData.csv", outputFileDescription);
  </code></pre>
  
  <p>How to I concat the List ?</p>