Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use AND operator in LINQ Join
    primarykey
    data
    text
    <p>I have following SQL Query</p> <pre><code>SELECT * FROM KDMS_dynamic vd INNER JOIN KDMS_definition tblKDMS ON tblKDMS.SystemID=vd.SystemID LEFT OUTER JOIN KDMS_typeid tblKDMSType ON tblKDMS.TypeId=tblKDMSType.TypeId INNER JOIN KDMS_configuration tblKDMSConfig ON tblKDMS.SystemID=tblKDMSConfig.SystemID AND tblKDMSConfig.ConfigurationDate = (SELECT MAX(ConfigurationDate) FROM KDMS_configuration vc WHERE vc.SystemID=tblKDMSConfig.SystemID) AND vd.LastUpdated=(SELECT MAX(LastUpdated) FROM KDMS_dynamic vd WHERE vd.SystemID=tblKDMS.SystemID) WHERE DeletionDate IS NULL AND LongDescription IS NOT NULL AND tblKDMS.TypeId &lt;&gt; 1 </code></pre> <p>As I have try convert the same in to LINQ but I can not due to AND OPERATOR use in Inner Join.</p> <p>I am not aware how to use And Operator in LINQ , JOIN</p> <p>As folloing the linq code which i try.</p> <pre><code>IQueryable&lt;getKDMS&gt; query = (from VD in this._db.GetTable&lt;KDMS_dynamic&gt;() join TblKDMS in this._db.GetTable&lt;KDMS_definition&gt;() on VD.SystemID equals TblKDMS.SystemID join TblKDMSType in this._db.GetTable&lt;KDMS_typeid&gt;().DefaultIfEmpty() on TblKDMS.TypeID equals TblKDMSType.TypeID join TblKDMSConfig in this._db.GetTable&lt;KDMS_configuration&gt;() on TblKDMS.SystemID equals TblKDMSConfig.SystemID &amp;&amp; TblKDMSConfig.ConfigurationDate == (from TblKDMS_conf in this._db.GetTable&lt;KDMS_configuration&gt;() where TblKDMS_conf.SystemID == TblKDMSConfig.SystemID select TblKDMS_conf.ConfigurationDate).Max()) </code></pre> <p>As i have try with &amp;&amp; but it did not work....</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload