示例#1
0
        public ActionResult Delete(long Id)
        {
            string ErrorMessage = string.Empty;

            //TODO : Calling Data Layer
            var IsSuccess = dalProduct.DeleteById(out ErrorMessage, Id);

            if (IsSuccess)
            {
                return(RedirectToAction("GetAll"));
            }
            else
            {
                ErrorMessage = ErrorClass + " | " + ErrorMessage;
                throw new Exception(ErrorMessage);
            }
        }