public void ShouldHaveValidAccountName() { var ats = new AzureTableSettings("altenchallengeapp", "privateKey", "VehicleDetails"); Assert.True(!string.IsNullOrEmpty(ats.StorageAccount)); Assert.Equal(ats.StorageAccount, "altenchallengeapp"); }
public void Test1() { string storageAccount = "janonostorage"; string storageKey = System.Environment.GetEnvironmentVariable("storageKey"); var osNameAndVersion = "";// System.Runtime.InteropServices.RuntimeInformation.OSDescription; string tableName = "testTableNetF" + osNameAndVersion; var setting = new AzureTableSettings(storageAccount, storageKey, tableName); var stor = new AzureTableStorage <TestContract>( new AzureTableSettings( storageAccount: storageAccount, storageKey: storageKey, tableName: tableName)); List <TestContract> listtest = new List <TestContract>(); for (int i = 0; i < 20000; i++) { var t = new TestContract(); t.PartitionKey = "_"; t.RowKey = i.ToString(); listtest.Add(t); } stor.GetTableAsyncCreateIfNotExistsAsync().GetAwaiter().GetResult(); stor.InsertReplace(listtest).GetAwaiter().GetResult(); stor.DeleteIfExistsAsync(); }
public AzureTableAccess(AzureTableSettings settings) => _settings = settings;
public AzureTableStorage(AzureTableSettings settings) { this.settings = settings; }
public AzureTableRepository(AzureTableSettings settings) { _settings = settings; _partitionKey = _settings.partitionKey; }