Ankit  Shukla

Ankit Shukla

  • NA
  • 681
  • 116.1k

not equal in LINQ query

Sep 2 2019 5:44 AM
Hello,
 
I have a query and I need to use "Not equal" in this.
 
Query:
  1. HRMSContext Entities = (this.HRMSRepository.Context as HRMSContext);  
  2. var query = from a in Entities.SCRB_t_UnidentifiedDeadBody_PS.Where(i => i.District == iDISTRICT_CD && i.PoliceStation == iPS_CD)  
  3. join ad in Entities.SCRB_t_UnidentifiedDeadBody on a.PanchnamaNo equals ad.PanchnamaNo  
  4. join d in Entities.m_district.Where(i => i.LANG_CD == 99) on a.District equals d.DISTRICT_CD  
  5. join p in Entities.m_police_station.Where(i => i.LANG_CD == 99 && i.DISTRICT_CD == iDISTRICT_CD) on a.PoliceStation equals p.PS_CD  
  6. select new  
  7. {  
  8. PanchnamaNo = a.PanchnamaNo,  
  9. GDDate = a.GDDate,  
  10. Find_Date = a.Find_Date,  
  11. DISTRICT = d.DISTRICT  
  12. };  
How to replace "equals(red color)" to "not equal" .
 
Please help.
Thanks in advance.

Answers (3)