public void Can_depend_on_DbContextOptions_with_default_service_provider() { using (SqlServerTestStore.GetNorthwindStore()) { using var context = new OptionsContext( new DbContextOptions <OptionsContext>(), new SqlConnection(SqlServerNorthwindTestStoreFactory.NorthwindConnectionString)); Assert.True(context.Customers.Any()); } }
public void CanUseOptionsInDbContextCtor() { using (var context = new OptionsContext(new DbContextOptions <OptionsContext>(), new MySqlConnection(MySQLTestStore.CreateConnectionString("db-optionsindbcontext")))) { context.Database.EnsureCreated(); Assert.True(context.Blogs.Count() == 0); context.Database.EnsureDeleted(); } }
public async void Can_depend_on_DbContextOptions_with_default_service_provider() { using (await SqlServerNorthwindContext.GetSharedStoreAsync()) { using (var context = new OptionsContext( new DbContextOptions <OptionsContext>(), new SqlConnection(SqlServerNorthwindContext.ConnectionString))) { Assert.True(context.Customers.Any()); } } }
public void Can_depend_on_DbContextOptions_with_default_service_provider() { using (NpgsqlTestStore.GetNorthwindStore()) { using (var context = new OptionsContext( new DbContextOptions <OptionsContext>(), new NpgsqlConnection(NpgsqlTestStore.NorthwindConnectionString))) { Assert.True(context.Customers.Any()); } } }
protected override void OnChange() { OptionsContext.Show(Cursor.Position.X, Cursor.Position.Y); }
public AsyncRefreshConfigurationSource(Func <OptionsContext, Task> updateProcess) { OptionsContext = new OptionsContext(); _optionsUpdatingProcess = Task.Run(async() => await updateProcess.Invoke(OptionsContext)); }
public void Can_depend_on_DbContextOptions_with_default_service_provider() { using (SqlServerNorthwindContext.GetSharedStore()) { using (var context = new OptionsContext( new DbContextOptions<OptionsContext>(), new SqlConnection(SqlServerNorthwindContext.ConnectionString))) { Assert.True(context.Customers.Any()); } } }
public YearTermsController(OptionsContext context) { _context = context; }
public OptionsWithSecondLevel(OptionsContext context, string[] args = null) : base(context) { }
public ChoicesController(OptionsContext context) { _context = context; }
public OptionsController(OptionsContext context) { _context = context; }