public ActionResult PassGriddata(List <Vehicles> griddata) { bool status = false; try { if (ModelState.IsValid) { VehicleServiceClient vehicleServiceClient = new VehicleServiceClient(); status = vehicleServiceClient.GriddataService(griddata); } } catch (Exception e) { ModelState.AddModelError("error", "Something Went Wrong"); status = false; throw e; } return(new JsonResult { Data = new { status = status } }); }