private IEnumerable <ProductsDto> GetProducts()
        {
            var op     = new getProductsOperation();
            var result = OperationManager.Instance.ExecuteOperation(op).Data as IEnumerable <ProductsDto>;


            return(result);
        }
        private void PopulateGridViewWithSpecificProducts()
        {
            var selectedCategory = this.dgvCategories.SelectedRows[0].DataBoundItem as CategoryDto;

            var id = selectedCategory.Id;

            var op     = new getProductsOperation(id);
            var result = OperationManager.Instance.ExecuteOperation(op);

            if (result.IsSuccessful)
            {
                var data = result.Data as IEnumerable <ProductsDto>;
                this.dgvProducts.DataSource = data;
            }
            else
            {
                MessageBox.Show(result.Errors.First());
            }
        }