Exemplo n.º 1
0
        public IActionResult ReOrder(int sourceId, int targetId)
        {
            if (!ModelState.IsValid)
            {
                return(new BadRequestObjectResult(ModelState));
            }

            if (sourceId == targetId)
            {
                return(new BadRequestObjectResult(ModelState));
            }

            _blogCategoryService.ReOrder(sourceId, targetId);
            _unitOfWork.Commit();
            return(new OkResult());
        }
Exemplo n.º 2
0
 public IActionResult ReOrder(int sourceId, int targetId)
 {
     if (!ModelState.IsValid)
     {
         return(new BadRequestObjectResult(ModelState));
     }
     else
     {
         if (sourceId == targetId)
         {
             return(new BadRequestResult());
         }
         else
         {
             _blogCategoryService.ReOrder(sourceId, targetId);
             _blogCategoryService.Save();
             return(new OkResult());
         }
     }
 }