public ActionResult pack([FromBody] List <Package> package) { if (!ModelState.IsValid) { return(new JsonResult(BadRequest(ModelState))); } var result = packagingService.ProcessPackages(package); return(new JsonResult(result)); }