Ejemplo n.º 1
0
        public ActionResult DeleteVehicle(int id)
        {
            bool status = false;

            try
            {
                if (ModelState.IsValid)
                {
                    VehicleServiceClient vehicleServiceClient = new VehicleServiceClient();
                    status = vehicleServiceClient.Delete(id);
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Went Wrong!");
                status = false;
                throw e;
            }
            return(View("Index"));
            // return new JsonResult { Data = new { status = status } };
        }