var resp = new HttpResponseMessage(HttpStatusCode.NotFound)
{
Content = new StringContent(JsonConvert.SerializeObject("Code has been not found"), Encoding.UTF8, "application/json"),
ReasonPhrase = "Code Not Found",
};
throw new HttpResponseException(resp);
var resp = new HttpResponseMessage(HttpStatusCode.NotFound)
{
Content = new StringContent(JsonConvert.SerializeObject("Code has been not found"), Encoding.UTF8, "application/json"),
ReasonPhrase = "Code Not Found",
};
throw new HttpResponseException(resp);