/// <summary>
        /// Gets the search web store view.
        /// </summary>
        /// <param name="message"> The web store view message.</param>
        /// <returns> The web store view result.</returns>
        public WebStoreViewResultMessage SearchWebStoreView(WebStoreViewMessage message)
        {
            // SearchWebStoreViewByKeyword
            // SearchWebStoreViewByPublisher
            SqlConnection connection = null;
            WebStoreViewResultMessage result = new WebStoreViewResultMessage();

            try
            {
                // Create connection string
                connection = new SqlConnection(_connectionString);
                connection.Open();

                WebStore webStore = new WebStore();

                if ( message.UsePaging )
                {
                    string sp = string.Empty;

                    if ( message.SearchByType == WebStoreViewMessage.SearchType.ByKeyword )
                    {
                        sp = "SearchWebStoreViewByKeyword";
                    }
                    if ( message.SearchByType == WebStoreViewMessage.SearchType.ByPublisher )
                    {
                        sp = "SearchWebStoreViewByPublisher";
                    }

                    webStore.EnforceConstraints = false;

                    SqlHelper.FillDataset(connection,
                        sp,
                        webStore,
                        new string[] {webStore.WebStoreApplications.TableName},
                        new object[] {message.SearchValue});

                    webStore.EnforceConstraints = true;
                }

                result.WebStoreView = webStore;
            }
            catch
            {
                throw;
            }
            finally
            {
                if ( connection.State != ConnectionState.Closed )
                {
                    connection.Close();
                }
            }

            return result;
        }
        /// <summary>
        /// Gets the web store view.
        /// </summary>
        /// <param name="message"> The web store view message.</param>
        /// <returns> The web store view result.</returns>
        public WebStoreViewResultMessage GetWebStoreView(WebStoreViewMessage message)
        {
            SqlConnection connection = null;
            WebStoreViewResultMessage result = new WebStoreViewResultMessage();

            try
            {
                // Create connection string
                connection = new SqlConnection(_connectionString);
                connection.Open();

                WebStore webStore = new WebStore();

                if ( message.UsePaging )
                {
                    webStore.EnforceConstraints = false;

                    SqlHelper.FillDataset(connection,
                        "GetWebStoreView",
                        webStore,
                        new string[] {webStore.WebStoreApplications.TableName},
                        new object[] {message.StartFromIndex});

                    webStore.EnforceConstraints = true;
                }

                result.WebStoreView = webStore;
            }
            catch
            {
                throw;
            }
            finally
            {
                if ( connection.State != ConnectionState.Closed )
                {
                    connection.Close();
                }
            }

            return result;
        }