public void search_for_multi_tenanted_entities() { var e1 = new SiteEntity {Name = "Jeremy", TenantId = theContext.CurrentTenant}; var e2 = new SiteEntity {Name = "Josh", TenantId = theContext.CurrentTenant}; var e3 = new SiteEntity {Name = "Jeremy", TenantId = Guid.NewGuid()}; var e4 = new SiteEntity {Name = "Josh", TenantId = Guid.NewGuid()}; thePersistor.Persist(e1); thePersistor.Persist(e2); thePersistor.Persist(e3); thePersistor.Persist(e4); theRepository.All<SiteEntity>().ShouldHaveTheSameElementsAs(e1, e2); theRepository.FindWhere<SiteEntity>(x => x.Name == "Jeremy").ShouldBeTheSameAs(e1); theContext.CurrentTenant = e3.TenantId; theRepository.FindWhere<SiteEntity>(x => x.Name == "Jeremy").ShouldBeTheSameAs(e3); }