public IHttpActionResult GetCustomer(Guid id)
        {
            var customer = db.GetCustomerByID(id);

            if (customer == null)
            {
                return(NotFound());
            }

            return(Ok(customer));
        }
Ejemplo n.º 2
0
        public AjaxResult GetCustomerByID([FromUri] Guid customerid)
        {
            var _ajaxResult = new AjaxResult();

            try
            {
                _ajaxResult.Data = _CustomerDL.GetCustomerByID(customerid);
            }
            catch (Exception ex)
            {
                _ajaxResult.Data    = ex;
                _ajaxResult.Message = Resources.errorVN;
                _ajaxResult.Success = false;
            }
            return(_ajaxResult);
        }