public IHttpActionResult GetVoucherById(int id) { VoucherModel voucher = voucherService.GetVoucherById(id); if (voucher == null) { return(NotFound()); } return(Ok(voucher)); }