darma teja

darma teja

  • NA
  • 496
  • 336.4k

write Linq for xmlDatatype-column

Jul 17 2019 4:17 AM
I have an xmldatatype column(name: xmlColumn) in tbCustomer Tabel. now I want to retrive in xmlColumn where /Address/street/No/text() in (1, 2, 3)
 
I can write it in SQL
 
  1. where xmlColumn.value('(/Address/street/No/text())[1]''INT'IN (1, 2, 3) // It works fine in sql editor 
 I wanted to include the above conditon in the following LINQ expression:
 
  1. var dataSource = from c in tbCustomer  
  2.              join o in tbOrder  on c.custID = o.custid  
  3.              select new   
  4.              {  c.custID,  
  5.                 c.custtname,  
  6.                  o.ordername  
  7.              } 
 

Answers (1)