public IHttpActionResult UpdateProduct([FromBody] villageproduct product, [FromUri] int id) { string msg; var data = prdctdetails.UpdateProduct(product, id); if (data == "Success") { msg = "Product Updated Succesfully"; } else { msg = "Product is not Updated try again"; } return(Json(msg)); }
public IHttpActionResult AddProduct([FromBody] villageproduct product) { string msg; var data = prdctdetails.InsertProduct(product); if (data == "Success") { msg = "Product Added Succesfully"; } else { msg = "Product is not added try again"; } return(Json(msg)); }