protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) { if (useTestDatabase) { optionsBuilder.UseSqlServer(EnvironmentalConfig.GetDbSetting(true)); } else { optionsBuilder.UseSqlServer(EnvironmentalConfig.GetDbSetting()); } } }
public string GetJwtIssuer() { var issuer = EnvironmentalConfig.GetJwtIssuer(); return(issuer); }
public async Task <EnvironmentalConfig> GetEnvironmentalConfig() { return(EnvironmentalConfig ?? (EnvironmentalConfig = await ConfigRepository.GetEnvironmentalConfig())); }
private void EndPoint_UserDelete(string host, string userName, bool onlyDeleteBucketListItems = false) { var url = host + "api/TgimbaApi/deleteuserbucketlistitems/" + userName + "/" + onlyDeleteBucketListItems.ToString(); var privateKey = EnvironmentalConfig.GetJwtPrivateKey(); var result = Delete(url, Base64Encode(userName), Base64Encode(privateKey)).Result; }