public Emissary(IConfiguration config, IBungieApiService bungieApiService, IManifestDao manifestDao, EmissaryDbContext dbContext, IEmissaryDao emissaryDao, IAuthorizationService authorizationService) { this.config = config; this.bungieApiService = bungieApiService; this.manifestDao = manifestDao; this.dbContext = dbContext; this.emissaryDao = emissaryDao; this.authorizationService = authorizationService; }
public static Emissary Startup(IConfiguration config) { IBungieApiService bungieApiService = new BungieApiService(config, new HttpClient()); IManifestDao manifestDao = new ManifestDao(config, new DatabaseAccessor()); SqliteConnection sqliteConnection = new SqliteConnection($"DataSource={config["Emissary:DatabasePath"]}"); sqliteConnection.Open(); DbContextOptions <EmissaryDbContext> dbContextOptions = new DbContextOptionsBuilder <EmissaryDbContext>() .UseSqlite(sqliteConnection) .Options; EmissaryDbContext dbContext = new EmissaryDbContext(dbContextOptions); dbContext.Database.EnsureCreated(); IEmissaryDao emissaryDao = new EmissaryDao(dbContext); IAuthorizationService authorizationService = new AuthorizationService(config, bungieApiService, emissaryDao); return(new Emissary(config, bungieApiService, manifestDao, dbContext, emissaryDao, authorizationService)); }
public AccessTokenDao(EmissaryDbContext dbContext) { this.dbContext = dbContext; }
public LoadoutDao(EmissaryDbContext context) { this.dbContext = context; }
public UserDao(EmissaryDbContext context) { this.dbContext = context; }