/// <summary>
        /// Delete an entity.
        /// </summary>
        /// <param name="model"></param>
        public void Delete(PurchaseRebateProductViewModel model)
        {
            var entity = model.ToEntity();

            this._PurchaseRebateProductsRepository.Delete(entity);

            #region Commit Changes
            this._unitOfWork.Commit();
            #endregion
        }
        /// <summary>
        /// Update an entity.
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public PurchaseRebateProductViewModel Update(PurchaseRebateProductViewModel model)
        {
            var entity = model.ToEntity();

            entity = this._PurchaseRebateProductsRepository.Update(entity);

            #region Commit Changes
            this._unitOfWork.Commit();
            #endregion

            model = entity.ToModel();
            return(model);
        }