Exemplo n.º 1
0
        private async Task <CatalogEntity> BackupToTableAsync(CatalogItem item)
        {
            StorageAccountHelper accountHelper = new StorageAccountHelper();

            accountHelper.tableConnectonString = configuration.GetConnectionString("TableConnection");
            return(await accountHelper.SaveToTableAsync(item));
        }
Exemplo n.º 2
0
        [NonAction] async Task <CatalogEntity> BackupToTableAsync(CatalogItem item)
        {
            StorageAccountHelper storageHelper = new StorageAccountHelper();

            storageHelper.TableConnectionString = configuration.GetConnectionString("TableConnection");
            return(await storageHelper.SaveToTableAsync(item));
        }
        private async Task <CatalogEntity> backUpToTableAsync(CatalogItem item)
        {
            StorageAccountHelper storageHelper = new StorageAccountHelper();

            storageHelper.tableConnectionString = config.GetConnectionString("TableStorageConnection");
            return(await storageHelper.SaveToTableAsync(item));
        }
Exemplo n.º 4
0
        private async Task <CatalogEntity> BackupToTableAsync(CatalogItem item)
        {
            StorageAccountHelper storageAccount = new StorageAccountHelper();

            //storageAccount.StorageConnectionString = _configuration.GetConnectionString("StorageConnection");
            //instead of storing on storage account backup stored in cosmos table api
            storageAccount.TableConjnectionString = _configuration.GetConnectionString("TableConnection");
            return(await storageAccount.SaveToTableAsync(item));
        }
Exemplo n.º 5
0
        private async Task <CatalogEntity> BackupToTableAsync(CatalogItem item)
        {
            StorageAccountHelper storageHelper = new StorageAccountHelper();

            // for storage account
            //storageHelper.StorageConnectionString = _configuration.GetConnectionString("StorageConnection");
            // for store in CosmosDB table storage account
            storageHelper.TableConnectionString = _configuration.GetConnectionString("TableConnection");
            return(await storageHelper.SaveToTableAsync(item));
        }
Exemplo n.º 6
0
 private async Task <CatalogEntity> BackupToTableAsync(CatalogItem item)
 {
     try
     {
         StorageAccountHelper storageHelper = new StorageAccountHelper();
         var cs = configuration.GetConnectionString("TableConnection");
         storageHelper.TableConnectionString = configuration.GetConnectionString("TableConnection");
         return(await storageHelper.SaveToTableAsync(item));
     }
     catch (Exception ex) { return(null); }
 }