Esempio n. 1
0
    public static IEnumerable GetEmployees()
    {
        IDataReader rdr = GetEmployeesReader();

        while (rdr.Read())
        {
            Employee emp = new Employee();
            DataRecordHelper.CreateRecord <Employee>(rdr, emp);
            yield return(emp);
        }
    }