Пример #1
0
 protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
 {
     if (!optionsBuilder.IsConfigured)
     {
         if (useTestDatabase)
         {
             optionsBuilder.UseSqlServer(EnvironmentalConfig.GetDbSetting(true));
         }
         else
         {
             optionsBuilder.UseSqlServer(EnvironmentalConfig.GetDbSetting());
         }
     }
 }
Пример #2
0
        public string GetJwtIssuer()
        {
            var issuer = EnvironmentalConfig.GetJwtIssuer();

            return(issuer);
        }
Пример #3
0
 public async Task <EnvironmentalConfig> GetEnvironmentalConfig()
 {
     return(EnvironmentalConfig ?? (EnvironmentalConfig = await ConfigRepository.GetEnvironmentalConfig()));
 }
Пример #4
0
 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;
 }