Sorry - I bet this has been asked lots of times before, but I can't find the answer to my question.

I have two entity framework classes, Companies, and Users. I want to produce a list of companies which have the user allocated to them.

```
public class FIGcompany
 {
    public int Id { get; set; }
    public string Name { get; set; }
    public virtual ICollection<UserProfile> Users { get; set; }

 }

public class UserProfile
{
    [Key]
    [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
    public int UserId { get; set; }
    public string UserName { get; set; }
    public ICollection<FIGcompany> Companies { get; set; }
}

```

The Linq I am using, I have got as far as:

```
 var t = db.Companies
            .Any(q => q.Users.Contains(q.Users.

```

can anyone help me finish it off, I am struggling to get the UserId field from users to do a comparison.

Thanks!