1
Answer

Using .contains LINQ method doesn't work properly.

Fares Ayyad

Fares Ayyad

7y
317
1
Hello
 
I'm trying to convert SQL like command to LINQ 
 
 
  1. select  EmployeeID,EnName from EmployeeMaintenance  
  2. where EmployeeID like '1'  
 
in c# code i replace the 1 with variable, that will be any value, but in debug i provide the same value which is 1:
 
 
  1. var test= _context.EmployeeMaintenances  
  2.                          .Where(c => c.EmployeeID.Contains(param.sSearch));  
 
 But the result is the wohle list in the table EmployeeMaintenances !!?
 
can any one figure the problem? 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Answers (1)