---
title: "Class DefinitionQueryFilter"
slug: "sdk--stylelabs.m.base.querying.filters.definitionqueryfilter"
abstract: ""
---
# Class DefinitionQueryFilter

Filters on entities of specified definition(s).

## Inheritance

object

[QueryFilter](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.queryfilter.html)

DefinitionQueryFilter

## Namespace: StylelabsStylelabs.MStylelabs.M.BaseQueryingFilters

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public class DefinitionQueryFilter : QueryFilter
```

## Properties

### Id

Gets or sets definition-id to filter on.

#### Declaration

```csharp
public long? Id { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| long |  |

### Ids

Gets or sets definition-ids to filter on. If multiple values are specified, the filter will combine them using "OR" (essentially an IN-clause).

#### Declaration

```csharp
public IEnumerable<long> Ids { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IEnumerable<>long |  |

### Name

Gets or sets name of the definition to filter on.

#### Declaration

```csharp
public string Name { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### Names

Gets or sets names of the definitions to filter on. If multiple values are specified, the filter will combine them using "OR" (essentially an IN-clause).

#### Declaration

```csharp
public IEnumerable<string> Names { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IEnumerable<>string |  |

### Operator

Gets or sets the operator used to compare the value(s). Must be either [Equals](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.comparisonoperator.html) or [NotEquals](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.comparisonoperator.html).

#### Declaration

```csharp
public ComparisonOperator Operator { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [ComparisonOperator](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.comparisonoperator.html) |  |

### Type

Gets the type of the filter.

#### Declaration

```csharp
public override FilterType Type { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [FilterType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.filtertype.html) |  |

#### Overrides

[QueryFilter.Type](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.queryfilter.html)

## Methods

### Accept(IFilterVisitor)

Accepts a query visitor.

#### Declaration

```csharp
public override void Accept(IFilterVisitor visitor)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [IFilterVisitor](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.ifiltervisitor.html) | visitor | The visitor to accept. |

#### Overrides

[QueryFilter.Accept(IFilterVisitor)](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.queryfilter.html)
