Query tax classes

Query a single tax class

To query a single tax class, 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 class.
    To get the specified tax class, you must either call the GetTaxClass method of the manager and pass the ID of the tax class as an argument, or call the GetTaxClasses method and filter the collection by one of the properties of the tax class (e.g. title).

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

Query a tax class by ID

Query a tax class by title

Query all tax classes

To query all tax classes, you must perform the following:

  1. Get an instance of the orders manager.
    Get an instance of the OrdersManager object.
  2. Get the tax classes.
    To get the tax classes, you must call the GetTaxClasses 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 tax classes