title: How to create custom attribute with Func<> parameter
body: <p>I have a class that helps me read data from an MS SQL database into a list of objects.  For the most part it's pretty straightforward; I can assume the property name of the class matches the column name of the table and just assign it accordingly, but sometimes I need to be able to transform data.</p>
  
  <p>I have created a custom attribute to put on my class properties:</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
  public class TransformDataAttribute : Attribute
  {
      public Func&lt;object, string, object&gt; TransformThisData { get; set; }
  }
  </code></pre>
  
  <p>Now, let's say I want to create the Func on the fly, like this:</p>
  
  <pre><code>    [TransformData(TransformThisData = new Func&lt;object, string, object&gt;((v, p) =&gt; "My name is " + v.ToString()))]
      public string Name { get; set; }
  </code></pre>
  
  <p>The error that I am seeing is 'TransformThisData' is not a valid named attribute argument because it is not a valid attribute parameter type.</p>
  
  <p>What is the best way to accomplish Func as a property attribute?</p>