This code returns a variable set of fields and I want to return a strongly typed <E>
:
public IList<E> Get(Expression<Func<E, object>> selectLambda == null)
{
if (selectLambda == null)
selectLambda = p => p;
var partialSet = DC.CreateQuery<E>("[" + typeof(E).Name + "]");
foreach ( var record in partialSet)
{
var tempEntity = new E(); // This is the error
MapIt( record, tempContract);
result.Add(tempContract);
}
return result;
}