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
|
Hi guys. Here is what I recently got into: List<MapObject> dbObjects = mapDataUnitOfWork.MapObjects.Where(
This should generate SQL like: SELECT * From MapObjects WHERE ObjectId IN (...) ... like it is done in Microsoft DLINQ But currently (v2.2.1254.12000) nightly build LightSpeedProfessional-20090802.msi It throws exception Can not cast \"System.Linq.Expressions.MemberExpression\" to \"System.Linq.Expressions.ConstantExpression\ at
Waiting for a response. Thanks |
|
|
We don't currently support Contains in the Where clause, only over the query results (e.g. if (uow.Customers.Select(c => c.Name).Contains('bob')) { ... }). I've now added basic support for Contains in the Where clause, and this will be included in the 2 September nightly build. It has some limitations but it should be sufficient for the query you describe. Please let us know if you run into any problems. |
|
|
thank you Ivan |
|
|
I'm having problems runing this type of query. My query is: var query = from role in uow.UserRoles |
|
|
Thanks for reporting this. It's fixed in the next drop of the LightSpeed 3 beta. It requires 3.0 features in the core so we won't be backporting it to 2.2. Please let us know if you still see problems. We've tested it with queries based on your example, but it may choke on more complex subqueries (e.g. multiply nested Contains queries, Contains comparisons on anonymous type projections). Let us know if you have more complex queries that you need to handle: we don't promise to support arbitrarily complex queries but we're always open to real-world use cases. |
|
|
OK, just tried the new drop of LS3. Working in our solution also. Thanks! |
|