public IActionResult GetProductList() { ProductDemoQuery _lQuery = new ProductDemoQuery(); var list = _lQuery.GetProductList(); if (list != null) { return(Ok(list)); } else { return(BadRequest()); } }
public IActionResult ProductDelete(int id) { ProductDemoQuery _lQuery = new ProductDemoQuery(); if (id != null) { string message = _lQuery.ProductDelete(id); //if(message=="Success") return(Ok("Successfully delete")); } else { return(BadRequest()); } }
public IActionResult ProductUpdate(int id, [FromBody] Product model) { ProductDemoQuery _lQuery = new ProductDemoQuery(); if (model != null) { string message = _lQuery.ProductUpdate(model); //if(message=="Success") return(Ok("Successfully Update")); } else { return(BadRequest()); } }