/// <summary>
        /// Deletes a record from the database.
        /// </summary>
        /// <param name="id">ID of review needing to be deleted</param>
        /// <returns>Returns a result based on status</returns>
        public ActionResult DeleteReview(int id)
        {
            ActionResult response;

            //check if logged in
            if (Session["RoleID"] != null)
            {
                //if logged in, check id
                if (id > 0)
                {
                    //if id is valid, access database
                    try
                    {
                        //pull review data
                        ReviewDO reviewDO = _ReviewDataAccess.ViewReviewByID(id);

                        //check permissions
                        if (Session["UserID"] != null && (int)Session["UserID"] == reviewDO.UserID || (int)Session["RoleID"] == 6)
                        {
                            //if allowed, map, then run data access method
                            ReviewPO reviewPO = _ReviewMapper.MapDOtoPO(reviewDO);
                            _ReviewDataAccess.DeleteReview(reviewPO.ReviewID);

                            response = RedirectToAction("Index", "Review");
                        }
                        else
                        {
                            //if not allowed, redirect to login page
                            response = RedirectToAction("Login", "Account");
                        }
                    }
                    catch (Exception ex)
                    {
                        //log error
                        _Logger.ErrorLog(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, ex);
                        response = RedirectToAction("Error", "Home");
                    }
                    finally { }
                }
                else
                {
                    //if id is invalid, redirect to details
                    response = RedirectToAction("ReviewDetails", "Review");
                }
            }
            else
            {
                //if not logged in, redirect to login page
                response = RedirectToAction("Login", "Account");
            }

            return(response);
        }
        public bool DeleteReview(int reviewId)
        {
            // create new instance of ReviewDAO
            ReviewDAO dataService = new ReviewDAO();


            if (dataService.DeleteReview(reviewId))
            {
                return(true);
            }

            else
            {
                return(false);
            }
        }