// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { var inMemorySqlite = new SqliteConnection("Data Source=:memory:"); inMemorySqlite.Open(); services.AddDbContext <WorkoutTrackerContext>(options => options.UseSqlite(inMemorySqlite)); Startup.AddSharedServices(services); }
public void ConfigurationServices(IServiceCollection services) { var inMemorySqlite = new SqliteConnection("Data Source=:memory:"); inMemorySqlite.Open(); services.AddMvc(); services.AddDbContext <F5DbContext>(options => options.UseSqlite(inMemorySqlite, b => b.MigrationsAssembly("WebApplication"))); Startup.AddSharedServices(services); }