public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddEnvironmentVariables(); Configuration = builder.Build(); //add for SQLite db: using (var db = new BooksSQLiteContext()) { db.Database.EnsureCreated(); db.Database.Migrate(); } }
public CRUDService(BooksSQLiteContext context) { db = context; }
public SearchService(BooksSQLiteContext context, IPopularityService _service) { db = context; _popularityService = _service; }
public PopularityService(BooksSQLiteContext context) { db = context; }