public IHttpActionResult AddNewActor(ActorModel actor) { try { if (actor == null || !ModelState.IsValid) { return(BadRequest(ModelState)); } actorService.AddNewActor(actor); } catch (Exception ex) { return(InternalServerError()); } return(new MyMessageResult("New Actor Successfully", Request)); }