public HttpResponseMessage AddProduct(OrderModel ParamOBJ) { int result = 0; try { result = objbiz.AddingNewProductDetails(ParamOBJ); var response = new HttpResponseMessage(HttpStatusCode.OK); if (result == 1) { response.Content = new StringContent("Product Added Succesfully..!!!"); } else { response.Content = new StringContent("You don't have any access to add this product details"); } response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); return(response); } catch { return(new HttpResponseMessage(HttpStatusCode.BadRequest)); } }