Query taxes

Query a single tax by a parameter

To query a single tax, you must perform the following:

  1. Get an instance of the orders manager.
    Get an instance of the OrdersManager object.
  2. Get the specified tax.
    To get the specified tax, you must either call the GetTax method of the manager and pass the ID of the tax as an argument, or call the GetTaxes method and filter the collection by one of the properties of the tax (e.g. title).

Use the following code samples to query a single tax by ID and by title:

Query tax by ID

Query tax by title

Query all taxes from a country

To query taxes by a specified country, you must perform the following:

  1. Get an instance of the orders manager.
    Get an instance of the OrdersManager object.
  2. Get the taxes.
    To get the taxes, you must call the GetTaxes method and filter the collection by the Country property of the Tax object.

Use the following code sample:

Query all taxes

To query all taxes, you must perform the following:

  1. Get an instance of the orders manager.
    Get an instance of the OrdersManager object.
  2. Get the taxes.
    To get the taxes, you must call the GetTaxes method.

Use the following code sample:

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?

Next article

Modify taxes