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
isNullbool?Matches null values if
true, non-null ones iffalse.equalsstringMatches values equal to this one.
notEqualsstringMatches values not equal to this one.
containsstringMatches values that contain this one.
startsWithstringMatches values that start with this one.
endsWithstringMatches values that end with this one.
inIEnumerable<string>Matches values equal to any of these (the query parameter is repeated, e.g. "id.in=1&id.in=2").
notInIEnumerable<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
EndsWith
Matches values that end with this one.
public string? EndsWith { get; set; }
Property Value
Equals
Matches values equal to this one.
public string? Equals { get; set; }
Property Value
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
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
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
StartsWith
Matches values that start with this one.
public string? StartsWith { get; set; }