using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
List<employee> lst = new List<employee>(){
new employee(){id =1,name="prajot",deptid = 1 },
new employee(){id =2,name="vishal",deptid = 1 },
new employee(){id =3,name="santosh",deptid = 2 },
new employee(){id =4,name="rajiv",deptid = 1 },
var v = lst.AsQueryable();
v= v.Where(x=> x.deptid==1);
v= v.Where(x=> x.name!="rajiv");
foreach(var i in result){
Console.WriteLine(i.id + " | " + i.name + " | " + i.deptid);
public string name {get;set;}
public int deptid {get;set;}