public IActionResult ReOrder(string sourceId, string targetId) { if (!ModelState.IsValid) { return(new BadRequestObjectResult(ModelState)); } else { if (sourceId == targetId) { return(new BadRequestResult()); } else { _functionService.ReOrder(sourceId, targetId); _functionService.Save(); return(new OkObjectResult(sourceId)); } } }