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
|
Consider I have an LSModel entity over which I have used an attribute with a logic : The entity seems like : [Attribute(X)] CaseMaster { } The attribute logic seems like : Attribute(value X) { Check if CaseMaster.AccountID = X } Now I have another LSModel entity with the same attribute applied like : [Attribute(X)] CaseDetail { } Now the requirement is to left join CaseDetail onto CaseMaster, the SQL query I need to execute is like : FROM CaseMaster t0 WHERE t0.AccountID = X LEFT JOIN CaseDetail t1 WHERE t1.AccountID = X SELECT t0.AccountID, t1.AccountID The LINQ I've written to currespond to such an SQL query is like : var details = (from t0 in UnitOfWork.CaseMasters join t1 in UnitOfWork.CaseDetails into t2 from t1 in t2.DefaltIfEmty() select new { t0.AccountID, t1.AccountID } But the SQL query that is actually being executed is like : FROM CaseMaster t0 LEFT JOIN CaseDetail t1 SELECT t0.AccountID, t1.AccountID WHERE t0.AccountID = X, t1.AccountID = X I am using LS November 20s nightly build. Expecting a reply ASAP. |
|