internal static void Merge(SqlDataReader Reader, EntitySet <TEntity> EntitySet) { CommandToken <TEntityContext, TEntity, TEntityCallBack> token = new CommandToken <TEntityContext, TEntity, TEntityCallBack>(Reader.GetSchemaTable()); if (!merge_setters.TryGetValue(token, out Action <SqlDataReader, EntitySet <TEntity> > merge)) { merge_setters.Add(token, merge = token.Generate_Merge_Setter()); } while (Reader.Read()) { merge(Reader, EntitySet); } }