Exemple #1
0
        /// <summary>
        /// Metoda do konstruowania i wywoływania zapytania za pomocą sesji NHibernate
        /// </summary>
        /// <param name="session">Sesja NHibernate</param>
        public override ProductCategoryForm Execute(ISession session)
        {
            var productCategory = session.Get <Domain.Product.ProductCategory>(productCategoryId);

            if (productCategory == null)
            {
                throw new TechnicalException(String.Format("Nie można znaleźć klienta o podanym id: {0}", productCategoryId));
            }

            return(ProductMapper.MapProductCategoryToForm(productCategory));
        }
Exemple #2
0
        /// <summary>
        /// Metoda do konstruowania i wywoływania zapytania za pomocą sesji NHibernate
        /// </summary>
        /// <param name="session">Sesja NHibernate</param>
        public override ProductCategoryForm Execute(ISession session)
        {
            var productCategory = session.Get <Domain.Product.ProductCategory>(productCategoryId);

            if (productCategory == null)
            {
                throw new TechnicalException(String.Format("The client with the given id can not be found: {0}", productCategoryId));
            }

            return(ProductMapper.MapProductCategoryToForm(productCategory));
        }