public GuestBookService(string connectionString)
 {
     storageAccount = CloudStorageAccount.FromConfigurationSetting(connectionString);
     string endpoint = storageAccount.TableEndpoint.AbsoluteUri;
     var credentials = storageAccount.Credentials;
     CloudTableClient.CreateTablesFromModel(typeof(GuestBookTableServiceContext), endpoint, credentials);
     tableServiceContext = new GuestBookTableServiceContext(endpoint, credentials)
     {
         RetryPolicy = RetryPolicies.Retry(3, TimeSpan.FromSeconds(1))
     };
 }
예제 #2
0
        public GuestBookService(string connectionString)
        {
            storageAccount = CloudStorageAccount.FromConfigurationSetting(connectionString);
            string endpoint    = storageAccount.TableEndpoint.AbsoluteUri;
            var    credentials = storageAccount.Credentials;

            CloudTableClient.CreateTablesFromModel(typeof(GuestBookTableServiceContext), endpoint, credentials);
            tableServiceContext = new GuestBookTableServiceContext(endpoint, credentials)
            {
                RetryPolicy = RetryPolicies.Retry(3, TimeSpan.FromSeconds(1))
            };
        }