In the select query how to put where condition for two column?

Ramakrishnan G asked on August 1, 2019 11:08

In the select linq query need add where condition for two columns. Column name1: Address and column name: city If two column values are means condition go to if(address!=null){}otherwise else{} I used below query not work. AddressInfo address = AddressInfoProvider.GetAddresses()
.WhereEquals("AddressLine", customerID) .And() .WhereEquals("AddressLine2", customerID); if (address != null) {} else{ }

Recent Answers

Ramakrishnan G answered on August 1, 2019 13:55

AddressInfo address = AddressInfoProvider.GetAddresses()
.WhereEquals("AddressLine", user.addressline1) .And() .WhereEquals("AddressLine2", user.addressline2);

  Its working fine
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.