I have
IEnumerable<Employee> GetAllEmployees()
{
return Get<IEmployeeRepository>().GetAll();
}
Where IEmployeeRepository is
public interface IEmployeeRepository
{
IEnumerable<Employee> GetAll();
}
Employee.cs is as under
public class Employee
{
public int EmployeeId { get; set; }
public string EmployeeName { get; set; }
public int Age { get; set; }
public int Salary { get; set; }
}
Now I want to perform a search on the records obtained from GetAllEmployees() based on the EmployeeId passed. Like as under
public void SearchEmployee(int empId)
{
var empRecords = this.GetAllEmployees();
var filteredRecords = empRecords.
}
I actually looked into this answer but could not fit into the requirement. What I need to do?