public string ActiveProduct(string id) { Dictionary <string, string> res = new Dictionary <string, string>(); var productModel = new ProductModel(); if (productModel.ActiveProduct(id)) { res.Add("status", "1"); } else { res.Add("status", "0"); } return(JsonConvert.SerializeObject(res)); }