Exemplo n.º 1
0
        public IActionResult GetProductList()
        {
            ProductDemoQuery _lQuery = new ProductDemoQuery();
            var list = _lQuery.GetProductList();

            if (list != null)
            {
                return(Ok(list));
            }
            else
            {
                return(BadRequest());
            }
        }
Exemplo n.º 2
0
        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());
            }
        }
Exemplo n.º 3
0
        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());
            }
        }