Exemple #1
0
        public JsonResult DeleteComment(Guid id)
        {
            Guid userID   = _appUserService.FindByUserName(HttpContext.User.Identity.Name).ID;
            bool IsDelete = false;

            if (_commentService.Any(x => x.AppUserID == userID))
            {
                IsDelete = true;
                _commentService.Remove(id);
                return(Json(IsDelete, JsonRequestBehavior.AllowGet));
            }
            else
            {
                IsDelete = false;
                return(Json(IsDelete, JsonRequestBehavior.AllowGet));
            }
        }