public Foo(Bar[] bars) { BarIdInKey = bars.ToDictionary(b => b.Id, b => "Some Value"); BarIdInValue = bars.ToDictionary(b => "Some Key", b => b.Id); }