This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm getting a parameter count mismatch exception when running a LINQ query using Lightspeed 3. The problem seems to be related to using an || in my where clause, ie where The stack trace is: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) Is this a bug, or should I be writing my LINQ query differently? |
|
|
It's probably a bug, but it looks like it's related to some other stuff that's going on in your query. I'm guessing you're doing a join or have multiple from clauses, plus possibly a projection in your select clause. Could you post the full query please? Thanks! |
|
|
I don't have the full query at hand, but it did include two joins and a projection, like this:
var stuff = from i in UnitOfWork.Items join m in UnitOfWork.Members where i.MemberId equals m.Id join h in UnitOfWork.ItemHistory where h.ItemId equals i.Id where m.Id == memberId && (i.Id == itemId || i.ParentId == itemId) && i.IsDeleted == false select new { Name = i.Name, ItemId = i.Id, LastUpdated = h.UpdatedDate }
|
|
|
Aha, thanks -- reproduced and investigating. |
|
|
A fix for this will be included in the next drop. Thanks for letting us know about the problem. |
|
|
Great - thanks for fixing it so quickly. When's the next drop planned for? |
|
|
It should be in the store now. |
|