예제 #1
0
        internal static void Refresh(SqlDataReader Reader, EntitySet <TEntity> EntitySet)
        {
            CommandToken <TEntityContext, TEntity, TEntityCallBack> token = new CommandToken <TEntityContext, TEntity, TEntityCallBack>(Reader.GetSchemaTable());

            if (!refresh_setters.TryGetValue(token, out Action <SqlDataReader, EntitySet <TEntity> > refresh))
            {
                refresh_setters.Add(token, refresh = token.Generate_Refresh_Setter());
            }

            while (Reader.Read())
            {
                refresh(Reader, EntitySet);
            }
        }