title: Type arguments cannot be inferred from usage, Can anyone help please?
body: <p>I am trying to use Dynamic Linq (the one published by ScottGu) to do a GroupBy (lambda expression). I have an object. And i am doing AsQueryable. THis is what i have..</p>
  
  <pre><code>var result = Items.AsQueryable().GroupBy("DeliveryDate");
  </code></pre>
  
  <p>but it gives me an error saying that arguments cannot be inferred from usage. I think its not looking at the right OrderBy.</p>
  
  <p>Items is a <code>List&lt;Stock&gt;</code>. </p>
  
  <p>I tried adding the &lt; > to <code>GroupBy</code> but i think i need to pass more than 1 item. I am a little confused.</p>
  
  <p>The field that i am passing in (via a string) could be any type, in this example it is a DateTime.</p>
  
  <p>If I do my standard LINQ it does work. i.e.:</p>
  
  <pre><code>var result = Items.AsQueryable().GroupBy( x =&gt; x.DeliveryDate);
  </code></pre>
  
  <p>Here is the extension method (from ScottGu):</p>
  
  <pre><code>public static IQueryable GroupBy(this IQueryable source, string keySelector, string elementSelector, params object[] values) {
      if (source == null) throw new ArgumentNullException("source");
      if (keySelector == null) throw new ArgumentNullException("keySelector");
      if (elementSelector == null) throw new ArgumentNullException("elementSelector");
      LambdaExpression keyLambda = DynamicExpression.ParseLambda(source.ElementType, null, keySelector, values);
      LambdaExpression elementLambda = DynamicExpression.ParseLambda(source.ElementType, null, elementSelector, values);
      return source.Provider.CreateQuery(
          Expression.Call(
              typeof(Queryable), "GroupBy",
              new Type[] { source.ElementType, keyLambda.Body.Type, elementLambda.Body.Type },
              source.Expression, Expression.Quote(keyLambda), Expression.Quote(elementLambda)));
  }
  </code></pre>
  
  <p>I have the using in the project <code>using System.Linq.Dynamic;</code> - and i am using dynamic <code>OrderBy</code> in another method, so i know it should be able to see it.</p>
  
  <p>I am a little confused, it seems using dynamic LINQ it doesn't understand what object I am using.</p>