ExpressionMethod with count on another table in linq2db v3.6 #3471
-
After updating my project from 2.9.8 to 3.6.0 this has stopped working again with a different error. I am not sure if this problem existed already in 3.0.0 since I upgraded from 2.9.8. private static Expression<Func<E_MAILER_MESSAGE_LIST, DataConnection, int>> AttachmentCountExpression()
{
return (m, dc) => dc.GetTable<E_MAILER_ATACHMENT_BASE>().Where(a => a.ID == m.ID).Count();
} The error I get is:
Do I need to do something different in 3.0 or is this a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks to @MaceWindu I have found the solution by changing the input parameter of the Expression from DataConnection to IDataContext. |
Beta Was this translation helpful? Give feedback.
Thanks to @MaceWindu I have found the solution by changing the input parameter of the Expression from DataConnection to IDataContext.