Exemple #1
0
        //Updating the Product
        public HttpResponseMessage put([FromBody] Products pr)
        {
            HttpResponseMessage errRes = Request.CreateErrorResponse(HttpStatusCode.OK, "Record Updated");

            //Handling Exception
            try
            {
                OlShoppingBusinessLayer bll = new OlShoppingBusinessLayer();
                bll.UpdateProductById(pr);
            }
            catch
            {
                errRes = Request.CreateErrorResponse(HttpStatusCode.NotFound, "Updation Error!!!");
            }
            return(errRes);
        }