/// <summary>
        /// Gets the table storage request for the given settings and values
        /// </summary>
        public TableStorageRequest GetTableStorageRequest(TableStorageSettings settings, DbParameterCollection parameters)
        {
            var rowKey = string.Empty;
            var partitionKey = string.Empty;
            var requestParameters = new List<string>();
            var bodyParameters = new List<string>();

            for (var i = setIndex + 1; i < whereIndex; i += 3)
            {
                bodyParameters.Add(commandTextParts[i]);
            }

            var rowKeyIndex = Array.FindIndex(commandTextParts, s => s == "RowKey");
            var rowKeyValueIndex = commandTextParts[rowKeyIndex + 2];
            var rowKeyValue = rowKeyValueIndex == "null" ? null : parameters[int.Parse(rowKeyValueIndex.TrimStart('p'))].Value.ToString();
            requestParameters.Add("RowKey=" + "'" + rowKeyValue + "'");
            rowKey = rowKeyValue;

            var partitionKeyIndex = Array.FindIndex(commandTextParts, s => s == "PartitionKey");
            var partitionKeyValueIndex = commandTextParts[partitionKeyIndex + 2];
            var partitionKeyValue = partitionKeyValueIndex == "null" ? null : parameters[int.Parse(partitionKeyValueIndex.TrimStart('p'))].Value.ToString();
            requestParameters.Add("PartitionKey=" + "'" + partitionKeyValue + "'");
            partitionKey = partitionKeyValue;

            var uri = String.Format(settings.Uri.AbsoluteUri + "{0}({1})", tableName, String.Join(",", requestParameters.ToArray()));
            
            var request = new TableStorageRequest(StorageHttpConstants.HttpMethod.Merge, uri, settings) { IfMatch = Tracker.GetIfMatchHeaderFor(tableName, rowKey, partitionKey) };
            for (var i = 0; i < bodyParameters.Count; i++)
            {
                request.Body.AddProperty(bodyParameters[i], parameters[i].Value, parameters[i].DbType);
            }
            return request;
        }
 /// <summary>
 /// Gets the table storage request for the given settings and values
 /// </summary>
 public TableStorageRequest GetTableStorageRequest(TableStorageSettings settings, DbParameterCollection parameters)
 {
     var parameterNames = new string[parameters.Count];
     Array.Copy(commandTextParts, 3, parameterNames, 0, parameters.Count);
     var request = new TableStorageRequest(StorageHttpConstants.HttpMethod.Post, String.Format(settings.Uri.AbsoluteUri + "{0}", tableName), settings);
     for (var i = 0; i < parameterNames.Length; i++)
     {
         request.Body.AddProperty(parameterNames[i], parameters[i].Value, parameters[i].DbType);
     }
     return request;
 }
        /// <summary>
        /// Gets the table storage request for the given settings and values
        /// </summary>
        public TableStorageRequest GetTableStorageRequest(TableStorageSettings settings, DbParameterCollection parameters)
        {
            var requestParameters = new List<string>();

            var rowKeyIndex = Array.FindIndex(commandTextParts, s => s == "RowKey");
            var rowKeyValueIndex = commandTextParts[rowKeyIndex + 2];
            var rowKeyValue = rowKeyValueIndex == "null" ? null : parameters[int.Parse(rowKeyValueIndex.TrimStart('p'))].Value.ToString();
            requestParameters.Add("RowKey=" + "'" + rowKeyValue + "'");

            var partitionKeyIndex = Array.FindIndex(commandTextParts, s => s == "PartitionKey");
            var partitionKeyValueIndex = commandTextParts[partitionKeyIndex + 2];
            var partitionKeyValue = partitionKeyValueIndex == "null" ? null : parameters[int.Parse(partitionKeyValueIndex.TrimStart('p'))].Value.ToString();
            requestParameters.Add("PartitionKey=" + "'" + partitionKeyValue + "'");

            var uri = String.Format(settings.Uri.AbsoluteUri + "{0}({1})", tableName, String.Join(",", requestParameters.ToArray()));
            var request = new TableStorageRequest(StorageHttpConstants.HttpMethod.Delete, uri, settings) { IfMatch = "*" };
            return request;
        }
 /// <summary>
 /// Creates a new instance of TableStorageRequest
 /// </summary>
 public TableStorageRequest(string method, Uri uri, TableStorageSettings settings)
 {
     Method = method;
     Uri = uri;
     this.settings = settings;
 }
 /// <summary>
 /// Creates a new instance of TableStorageRequest
 /// </summary>
 public TableStorageRequest(string method, string uri, TableStorageSettings settings)
     : this(method, new Uri(uri), settings) { }
 /// <summary>
 /// Creates a new instance of TableStorageCommand using the passed in settings
 /// </summary>
 /// <param name="tableStorageSettings"></param>
 public TableStorageCommand(TableStorageSettings tableStorageSettings)
 {
     settings = tableStorageSettings;
 }
 /// <summary>
 /// Gets the table storage request for the given settings and values
 /// </summary>
 public TableStorageRequest GetTableStorageRequest(TableStorageSettings settings, DbParameterCollection parameters)
 {
     var request = new TableStorageRequest(StorageHttpConstants.HttpMethod.Post, String.Format(settings.Uri.AbsoluteUri + "{0}", "Tables"), settings);
     request.Body.AddProperty("TableName", tableName);
     return request;
 }
 /// <summary>
 /// Create a new instance of TableStorageDriver
 /// </summary>
 public TableStorageDriver(TableStorageSettings settings)
 {
     tableStorageSettings = settings;
 }
 /// <summary>
 /// Gets the table storage request for the given settings and values
 /// </summary>
 public TableStorageRequest GetTableStorageRequest(TableStorageSettings settings, DbParameterCollection dbParameterCollection)
 {
     var requestUri = GetRequestUri(settings.Uri.AbsoluteUri, dbParameterCollection);
     return new TableStorageRequest(StorageHttpConstants.HttpMethod.Get, requestUri, settings);
 }
 /// <summary>
 /// Creates a new instance of TableStorageConnection based on the settings passed
 /// </summary>
 /// <param name="settings"></param>
 public TableStorageConnection(TableStorageSettings settings)
 {
     tableStorageSettings = settings;
     Tracker = new ETagTracker();
 }