/// <summary>
        /// Get product by given id
        /// </summary>
        /// <param name="id">Product identifier</param>
        /// <returns>The product</returns>
        public static Product GetProductById(int id)
        {
            var paramValues = new Dictionary <string, object>();

            paramValues["Id"] = id;

            Product product = null;

            var dalResult = DataManager.GetProductById(paramValues);

            foreach (Dictionary <string, object> dalProduct in dalResult)
            {
                product = ProductMapper.Map(dalProduct);
            }

            return(product);
        }
        /// <summary>
        /// Get all products
        /// </summary>
        /// <returns>Products collection</returns>
        public static IEnumerable <Product> GetAllProducts()
        {
            // The result
            var result = new List <Product>();

            // Get all product values from database
            var dalResult = DataManager.GetAllProducts();

            foreach (Dictionary <string, object> dalProduct in dalResult)
            {
                // Get product from product values
                var product = ProductMapper.Map(dalProduct);

                // Add the product to the result
                result.Add(product);
            }

            return(result);
        }