Table of Contents

Class StringFilter

Namespace
Magicalizer.Filters.Abstractions
Assembly
Magicalizer.Filters.Abstractions.dll

Filter of string properties. The strings are compared as the database compares them (its collation decides, e.g., whether the case is ignored). Only the conditions that are set are applied.

public class StringFilter : IFilter
Inheritance
StringFilter
Implements
Inherited Members

Constructors

StringFilter()

Creates an empty filter.

public StringFilter()

StringFilter(bool?, string?, string?, string?, string?, string?, IEnumerable<string>?, IEnumerable<string>?)

Creates a filter with the given conditions.

public StringFilter(bool? isNull = null, string? equals = null, string? notEquals = null, string? contains = null, string? startsWith = null, string? endsWith = null, IEnumerable<string>? @in = null, IEnumerable<string>? notIn = null)

Parameters

isNull bool?

Matches null values if true, non-null ones if false.

equals string

Matches values equal to this one.

notEquals string

Matches values not equal to this one.

contains string

Matches values that contain this one.

startsWith string

Matches values that start with this one.

endsWith string

Matches values that end with this one.

in IEnumerable<string>

Matches values equal to any of these (the query parameter is repeated, e.g. "id.in=1&id.in=2").

notIn IEnumerable<string>

Matches values not equal to any of these (the query parameter is repeated, e.g. "id.notin=1&id.notin=2").

Properties

Contains

Matches values that contain this one.

public string? Contains { get; set; }

Property Value

string

EndsWith

Matches values that end with this one.

public string? EndsWith { get; set; }

Property Value

string

Equals

Matches values equal to this one.

public string? Equals { get; set; }

Property Value

string

In

Matches values equal to any of these (the query parameter is repeated, e.g. "id.in=1&id.in=2").

public IEnumerable<string>? In { get; set; }

Property Value

IEnumerable<string>

IsNull

Matches null values if true, non-null ones if false.

public bool? IsNull { get; set; }

Property Value

bool?

NotEquals

Matches values not equal to this one.

public string? NotEquals { get; set; }

Property Value

string

NotIn

Matches values not equal to any of these (the query parameter is repeated, e.g. "id.notin=1&id.notin=2").

public IEnumerable<string>? NotIn { get; set; }

Property Value

IEnumerable<string>

StartsWith

Matches values that start with this one.

public string? StartsWith { get; set; }

Property Value

string