I have following C# code. It helped me to avoid some code repetition in a good way. The ExecuteQueryGenericApproach<T> method receives a Func generic delegate as argument. The delegated method has a parameter which receives IDataRecord as argument.  That is, the  ExecuteQueryGenericApproach<T> method provides the required IDataRecord to the functions passed to it. QUESTIONSWhat is the name of this pattern? (Based on GoF design patterns)Is there any other scenario where this pattern is used?Note: Knowing the name of this pattern will help me to better research on this and find opportunities to use it.CommonDALpublic class CommonDAL{    public static IEnumerable<T> ExecuteQueryGenericApproach<T>(string commandText, List<SqlParameter> commandParameters, Func<IDataRecord, T> methodToExecute)    {        string connectionString = @Server=XXXX;Database=AS400_Source;User Id=dxxx;Password=xxxx5;        //Action, Func and Predicate are pre-defined Generic delegates.        //So as delegate they can point to functions with specified signature.        using (SqlConnection connection = new SqlConnection(connectionString))        {            using (SqlCommand command = new SqlCommand())            {                command.Connection = connection;                command.CommandType = CommandType.Text;                command.CommandText = commandText;                command.CommandTimeout = 0;                if (commandParameters != null)                {                    command.Parameters.AddRange(commandParameters.ToArray());                }                connection.Open();                using (var rdr = command.ExecuteReader())                {                    while (rdr.Read())                    {                        yield return methodToExecute(rdr);                    }                    rdr.Close();                }            }        }    }}EmployeeDAL public class EmployeeRepositoryDAL    {        public static List<Employee> GetEmployees()        {            string commandText = @SELECT E.EmployeeID,E.EmployeeName,R.RoleID,R.RoleName FROM dbo.EmployeeRole ER                                    INNER JOIN dbo.Employee E  ON E.EmployeeID= ER.EmployeeID                                    INNER JOIN dbo.[Role] R ON R.RoleID= Er.RoleID ;            //IEnumerable<Employee> employees = MyCommonDAL.ExecuteQueryGenericApproach<Employee>(commandText, commandParameters, Employee.EmployeeFactory);            //Group By is needed for listing all the roles for an employee.            IEnumerable<Employee> employees = CommonDAL.ExecuteQueryGenericApproach<Employee>(commandText, null, Employee.EmployeeCreator)                                                    .GroupBy(x => new { x.EmployeeID, x.EmployeeName },                                                            (key, group) =>                                                                            new Employee                                                                            {                                                                                EmployeeID = key.EmployeeID,                                                                                EmployeeName = key.EmployeeName,                                                                                Roles = group.SelectMany(v => v.Roles).ToList()                                                                            }                                                            ).ToList();            return employees.ToList();        }    }Entitypublic class Employee{    public int EmployeeID { get; set; }    public string EmployeeName { get; set; }    public List<Role> Roles { get; set; }    //IDataRecord Provides access to the column values within each row for a DataReader    //IDataRecord is implemented by .NET Framework data providers that access relational databases.    //Static Method    public static Employee EmployeeCreator(IDataRecord record)    {        var employee = new Employee        {            EmployeeID = (int)record[0],            EmployeeName = (string)record[1],            Roles = new List<Role>()        };        employee.Roles.Add(new Role { RoleID = (int)record[2], RoleName = (string)record[3] });        return employee;    }}
Is this a design pattern?
design patterns;.net