예제 #1
0
        public HttpResponseMessage Delete([FromBody] Models.brand brand)
        {
            try
            {
                //int con_id = int.Parse(country_id);
                bool updatCountry = brandRepository.Deletebrand(brand.brand_id);

                var formatter = RequestFormat.JsonFormaterString();
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    output = "success", msg = "Brand Delete Successfully."
                }, formatter));
            }
            catch (Exception ex)
            {
                var formatter = RequestFormat.JsonFormaterString();
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    output = "error", msg = ex.ToString()
                }, formatter));
            }
        }