public void AddShowInDb([FromBody] Show show) { var result = Parse.AddShowInDB(show); if (result == false) { var resp = new HttpResponseMessage(HttpStatusCode.NotFound) { Content = new StringContent(string.Format("Сериал с ID = {0} уже существует", show.Id)), ReasonPhrase = "Введите другой Id" }; throw new HttpResponseException(resp); } }