public static IEnumerable GetEmployees() { IDataReader rdr = GetEmployeesReader(); while (rdr.Read()) { Employee emp = new Employee(); DataRecordHelper.CreateRecord <Employee>(rdr, emp); yield return(emp); } }
public static IEnumerable GetEmployees() { IDataReader rdr = GetEmployeesReader(); while (rdr.Read()) { Employee emp = new Employee(); DataRecordHelper.CreateRecord <Employee>(rdr, emp); yield return(emp); } }