public IHttpActionResult GetCustomer(Guid id) { var customer = db.GetCustomerByID(id); if (customer == null) { return(NotFound()); } return(Ok(customer)); }
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); }