public IHttpActionResult AddNewDirector([FromBody] DirectorModel director) { // director not null if (director != null) { // create server director DirectorService DirectorService = new DirectorService(); DirectorService serviceDirector = new DirectorService(); // add director var check = DirectorService.AddNewDirector(director); // add success if (check > 0) { return(Ok(director)); } else { return(BadRequest("Thêm đạo diễn thất bại")); } } // director is null return(BadRequest("Đạo diễn thêm mới đang bị NULL")); }