using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
public static void Main()
var one = new List<Record>(){new Record(){Id = "one", Value = "1"},new Record(){Id = "two", Value = "2"}};
var two = new List<Record>(){new Record(){Id = "one", Value = "1"},new Record(){Id = "two", Value = "2"}};
var three = new List<Record>(){new Record(){Id = "one", Value = "1"},new Record(){Id = "two", Value = "2"}};
var masters1 = one.Select(x => x.Id);
var masters2 = two.Select(x => x.Id);
var masters3 = three.Select(x => x.Id);
if (masters1.Count() != masters1.Intersect(masters2).Count())
throw new Exception("one IDs did not match two IDs");
if (masters2.Count() != masters2.Intersect(masters3).Count())
throw new Exception("two IDs did not match three IDs");
var rv = new List<Records>();
foreach (var master in masters1)
var record = new Records()
One = one.Single(x => x.Id == master),
Two = two.Single(x => x.Id == master),
Three = three.Single(x => x.Id == master),
Console.WriteLine(x.One.Value);
Console.WriteLine(x.Two.Value);
Console.WriteLine(x.Three.Value);