title: The best overloaded method match for 'System.Collections.Generic.List<XXX.Models.Domain>.Add(XXX.Models.Domain)' has some invalid arguments
body: <p>I am trying to first search the domain ids from a particular table based on tenant and then for the domain id I am looking for domain names in another table and adding in  a list. I am getting an error on adding the domain object in my list. My code is as shown below:</p>
  
  <pre><code>public IEnumerable&lt;Domain&gt; GetAllByTenant(Guid tenantId)
      {
          List&lt;Domain&gt; domains = null;
          var ids = _applicationDbContext.TenantDomainMap.Where(x =&gt; x.TenantId == tenantId).Select(x =&gt; x.DomainId);
  
          foreach (var id in ids)
          {
              var domain = _applicationDbContext.Domain.Where(x =&gt; x.DomainId == id);
              domains.Add(domain);
  
          }
          return domains;
      }
  </code></pre>
  
  <p>I am getting following errors at domains.Add(domain):
  1. The best overloaded method match for 'System.Collections.Generic.List.Add(XXX.Models.Domain)' has some invalid arguments
  2. cannot convert from 'System.Linq.IQueryable' to 'XXX.Models.Domain'</p>
  
  <p>Please help me in resolving this issue.</p>