Exemplo n.º 1
0
        public IActionResult SetLabel([FromBody] SetLabelCommentParam param)
        {
            var s = SemEvalRepository.SetLabelComment(param).Result;

            if (!s)
            {
                return(BadRequest());
            }
            return(Json(new { Message = "ثبت شد" }));
        }
Exemplo n.º 2
0
 public async Task <bool> SetLabelComment(SetLabelCommentParam param)
 {
     try
     {
         var comment = dBContext.Comments.Find(param.CommentId);
         if (comment == null)
         {
             return(false);
         }
         comment.CGOLD     = param.Label;
         comment.LabelDate = DateTime.Now;
         dBContext.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }