title: C# Linq nested selects not returning everything
body: <p>I'm trying to select information from multiple tables via Linq. The query works if I take out the last Api query <code>from apis in Database.PluginApis where apis.PluginId == tenantPlugin.PluginId</code>. If I put the query back in, it results in an error <code>System.Collections.Generic.KeyNotFoundException: The given key 'Name' was not present in the dictionary.</code> Anyone able to see what I am doing wrong?</p>
  
  <pre><code>var results = (from tenantPlugin in Database.TenantPlugins
                             where tenantPlugin.TenantId == tenantId
  
                             select new TenantPlugin
                             {
                                 PluginId = tenantPlugin.PluginId,
                                 IsEnabled = tenantPlugin.IsEnabled,
                                 TenantId = tenantPlugin.TenantId,
                                 TenantPluginId = tenantPlugin.TenantPluginId,
                                 Plugin = (from plugin in Database.Plugins
                                           where plugin.PluginId == tenantPlugin.PluginId
                                           select new Plugin
                                           {
                                               PluginId = plugin.PluginId,
                                               Name = plugin.Name,
                                               Description = plugin.Description,
                                               ImagePath = plugin.ImagePath,
                                               IsActive = plugin.IsActive,
                                               Apis = (from apis in Database.PluginApis
                                                           where apis.PluginId == tenantPlugin.PluginId                                                             
                                                       select new PluginApi
                                                       {
                                                           Name = apis.Name
                                                       }).ToList&lt;PluginApi&gt;()
                                           }).FirstOrDefault&lt;Plugin&gt;()
                             });
  
              return results.ToList();
  </code></pre>