Hi,
How to build the where clause in LINQ according to the supplied values. Say for example, user can search only by Name, or by Name and Mobile No or by Name or City and so on (i.e. as per combination of fileds) Thanks.
Hi AjayP,
Use where condition like below.
from customer in ctx.Customers where customer.Name == "Mudassar Khan" || customer.City == "Mumbai" && customer.MobileNo = "9999999999" select customer;
Also referr the below article.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.