Could someone please suggest if there is any way to write below SQL query using LINQ Query(VB.Net)
Select Count(Distinct(User_ID)) from tbl_CTRL where Req_ID = "R1" AND User_ID in ('001','002','005','007')
Dim ids As New List(Of String) ids.Add("001") ids.Add("002") ids.Add("005") ids.Add("007") Dim records = From item in YourContext.YourTable Where ids.Contains(item.User_ID) Select item
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)