I am following this blog to try to create an IQueryable provider for MSAccess for a project I am working on at the moment.
I got as far as the page I linked to above, but a couple of pieces of code create classes which inherit from ExpressionVisitor
and override its VisitMemberAccess
method, in this method for example:
protected override Expression VisitMemberAccess(MemberExpression m)
{
if (m.Expression != null && m.Expression.NodeType == ExpressionType.Parameter)
{
if (this.sb.Length > 0)
{
this.sb.Append(", ");
}
this.sb.Append(m.Member.Name);
return Expression.Convert(Expression.Call(this.row, miGetValue, Expression.Constant(iColumn++)), m.Type);
}
else
{
return base.VisitMemberAccess(m);
}
}
The problem is that this does not compile because the VisitMemberAccess
method is not available anymore. I have googled this for a while and found a few references to this method, but they all seem to date back to .NET 3.5 (see here for e.g.).
I would like to know what happened to that method? And more importantly what to do instead of overriding VisitMemberAccess
.
The equivalent method for the .NET 3.5 framework's ExpressionVisitor.VisitMemberAccess
in .NET 4.0 is ExpressionVisitor.VisitMember
. I'm not sure why they changed the name of the method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With