title: how to create records for writing a csv file with FileHelpers
body: <p>I am using Filehelpers to import my database from files.  I am now working on the reverse process and am having trouble seeing how to create the records from my data objects.</p>
  
  <p>All the examples I can find show going from file -> table -> file
  I am using interfaces with generics to convert. I use this one on the inbound conversion:</p>
  
  <pre><code> public interface IConvertCSVRecordToType&lt;T&gt; where T : SimpleBase
    {
      T ConvertCSVRecordToType();
    }
  </code></pre>
  
  <p>and would like to use something like this for the outbound:</p>
  
  <pre><code> public interface IConvertTypeToCSVRecord&lt;T&gt; where T : SimpleBase, new()
    {
      void ConvertTypeToCSVRecord(T type);
    }
  </code></pre>
  
  <p>I use this class to represent the CSV Records:</p>
  
  <pre><code>  [DelimitedRecord(";"), IgnoreEmptyLines]
    public class CSVRecordFormat : IConvertCSVRecordToType&lt;Material&gt;, 
                                   IConvertTypeToCSVRecord&lt;Material&gt;
  </code></pre>
  
  <p>I came across TransformToRecordAttribute in the Filehelpers documentation</p>
  
  <blockquote>
    <p>TransformToRecordAttribute Class </p>
    
    <p>With
    this attribute you can mark a method
    in the RecordClass that is the
    responsable of convert it to the
    specified. </p>
  </blockquote>
  
  <p>Does anyone have an example that uses this attribute or an example of how to create a record set to get me in the right direction?</p>