Hi Kladane,
Your Only have to specify the return type of the query.
Here is an example.
Employee ObjEmployee = new Employee();
ObjEmployee = ObjEmployee.GetAllEmployee().Where(emp => emp.EmployeeCode == txtempcode.Text).FirstOrDefault();
.SingleOrDefault()
.ToList()
List<employee> ObjEmployeeList = new List<employee>();
ObjEmployeeList = ObjEmployeeList.GetAllEmployee().Where(emp => emp.EmployeeCode == txtempcode.Text).ToList();
</employee></employee>
One Detail thought, the syntax may be incorrect based on your method(GetAllEmployee) code.
I generaly write GetAll method as static so it is independent form the instance.
In that case. the code will be like this.
List<employee> ObjEmployeeList = new List<employee>();
ObjEmployeeList = Employee.GetAllEmployee().Where(emp => emp.EmployeeCode == txtempcode.Text).ToList();
</employee></employee>
Hope it helps