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()); }
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()); } } }