title: How to write accessor expression to infer the type?
body: <p>Given the following code</p>
  
  <pre><code>[Table("Bar")]
  public class Foo {
    [Column("BarID")]
    public int Id { get; set; }
  }
  public static class MyExtensions {
    public static string TableName(this Type type) {
      var attrib = type.GetCustomAttribute&lt;TableAttribute&gt;(false);
      return attrib?.Name ?? type.Name;
    }
    public static string ColumnName&lt;TType, TMember&gt;(this Type t, Expression&lt;Func&lt;TType, TMember&gt;&gt; accessor) {
      var member = accessor.Body as MemberExpression;
      if (member != null) {
        var field = member.Member;
        var attrib = field.GetCustomAttribute&lt;ColumnAttribute&gt;();
        return attrib?.Name ?? field.Name;
      }
      return null;
    }
  }
  </code></pre>
  
  <p>I can then write code like <code>typeof(Foo).TableName();</code> to get the table name</p>
  
  <p>For the column name I can use <code>typeof(Foo).ColumnName((Foo f) =&gt; f.Id)</code></p>
  
  <p>How can I get the ColumnName extension method to infer TType in the accessor expression so that I can simply code as <code>type(Foo).ColumnName(f =&gt; f.Id)</code></p>