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
|
In Linq to SQL you can add custom association logic to the DataLoadOptions. In Lightspeed is there a way to specify custom association logic like in Linq to SQL? |
|
|
DataLoadOptions.LoadWith is handled by LightSpeed's eager loading and named aggregates functionality. See Help Topics > LightSpeed > Querying - Basic Features for more info. I don't think we have a direct equivalent to DataLoadOptions.AssociateWith, but you can get most of the functionality (if I've understood it correctly) using the Entity.Query extension method: using Mindscape.LightSpeed.Linq; public IQueryable<Order> GetHighValueOrders(Customer customer) { Note that you specify named aggregates and collection queries on a per-query basis, rather than per-DataContext; and that eager loads and aggregate definitions are part of the model definition, rather than per-DataContext. |
|