예제 #1
0
        /// <summary>
        /// Delete an blog product
        /// </summary>
        /// <param name="blogProduct">Blog product</param>
        public virtual async Task DeleteBlogProduct(BlogProduct blogProduct)
        {
            if (blogProduct == null)
            {
                throw new ArgumentNullException("blogProduct");
            }

            await _blogProductRepository.DeleteAsync(blogProduct);

            //event notification
            await _mediator.EntityDeleted(blogProduct);
        }
예제 #2
0
        /// <summary>
        /// Insert an blog product
        /// </summary>
        /// <param name="blogProduct">Blog product</param>
        public virtual async Task InsertBlogProduct(BlogProduct blogProduct)
        {
            if (blogProduct == null)
            {
                throw new ArgumentNullException(nameof(blogProduct));
            }

            await _blogProductRepository.InsertAsync(blogProduct);

            //event notification
            await _mediator.EntityInserted(blogProduct);
        }