Check out example codes for "Func<IDataRecord, T> c#". It will help you in understanding the concepts better.

Code Example 1

public IEnumerable<T> GetData<T>(IDataReader reader, Func<IDataRecord, T> BuildObject)
{
    try
    {
        while (reader.Read())
        {
            yield return BuildObject(reader);
        }
    }
    finally
    {
         reader.Dispose();
    }
}

//call it like this:
var result = GetData(YourLibraryFunction(), Employee.Create);

Learn ReactJs, React Native from akashmittal.com