Exemplo n.º 1
0
        public IHttpActionResult Delete(GetProductById_Input input)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }


            dal.ProductDelete(input);

            return(Ok());
        }
Exemplo n.º 2
0
        public IHttpActionResult GetProductById(int productId)
        {
            GetProductById_Input input = new GetProductById_Input()
            {
                ProductId = productId
            };


            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }


            GetProduct_ResultSet product = dal.GetProductById(input);

            return(Ok(product));
        }
Exemplo n.º 3
0
 public void ProductDelete(GetProductById_Input input)
 {
     db.ProductDelete.CallStoredProc(input);
 }
Exemplo n.º 4
0
        public GetProduct_ResultSet GetProductById(GetProductById_Input input)
        {
            GetProduct_ResultSet product = db.ProductByIdInput.CallStoredProc(input).ToList <GetProduct_ResultSet>().FirstOrDefault();

            return(product);
        }