public void Can_select_appropriate_provider_when_multiple_registered_with_default_service_provider() { using (var context = new MultipleProvidersContext()) { context.UseSqlServer = true; Assert.True(context.SimpleEntities.Any()); } using (var context = new MultipleProvidersContext()) { context.UseSqlServer = false; Assert.False(context.SimpleEntities.Any()); } }
public void Can_select_appropriate_provider_when_multiple_registered_with_default_service_provider() { using (SqlServerTestStore.GetNorthwindStore()) { using (var context = new MultipleProvidersContext()) { context.UseSqlServer = true; Assert.True(context.Customers.Any()); } using (var context = new MultipleProvidersContext()) { context.UseSqlServer = false; Assert.False(context.Customers.Any()); } } }
public SomeService(MultipleProvidersContext context) { Context = context; }
public void Can_select_appropriate_provider_when_multiple_registered_with_default_service_provider() { using (SqlServerNorthwindContext.GetSharedStore()) { using (var context = new MultipleProvidersContext()) { context.UseSqlServer = true; Assert.True(context.Customers.Any()); } using (var context = new MultipleProvidersContext()) { context.UseSqlServer = false; Assert.False(context.Customers.Any()); } } }