Namespace - LJCDBMessage
Syntax
C# |
public class DbFilters : List<DbFilter>
|
Represents a collection of
DbFilter objects.
(E)
Remarks
The common collection static methods are: HasItems(),
SQLSoundexFilters() and SoundexFilters().
The collection contains a copy constructor.
The common collection instance methods are: Add() + 1 overload
and Clone().
Constructor
#ctor
|
Initializes an object instance. |
#ctor
|
The Copy constructor. |
Collection
Add
|
Creates and adds the element from the supplied values. |
Add
|
Creates and adds the element from the supplied values. |
Clone
|
Clones the structure of the object. |
Other Public Methods
7 Methods
Example
C# |
using LJCDBMessage;
DbConditions dbConditions = new DbConditions();
DbCondition dbCondition = new DbCondition()
{
FirstValue = "Name",
ComparisonOperator = "=",
SecondValue = "John"
};
dbConditions.Add(dbCondition);
DbConditionSet dbConditionSet = new DbConditionSet()
{
BooleanOperator = "and",
Conditions = dbConditions
};
DbFilter dbFilter = new DbFilter()
{
Name = "Main Filter",
BooleanOperator = "and",
ConditionSet = dbConditionSet
};
DbFilters dbFilters = new DbFilters();
dbFilters.Add(dbFilter);
DbFilter dbFilter = new DbFilter();
DbConditions conditions = dbFilter.ConditionSet.Conditions;
conditions.Add("FirstName", "'John'");
conditions.Add("LastName", "'Smith'");
DbFilters dbFilters = new DbFilters
{
dbFilter
};
DbRequest dbRequest = new DbRequest("Select", "Person")
{
DataConfigName = "PersonData",
Columns = new DbColumns() { {"Name" }},
Filters = dbFilters
};
DbFilter secondFilter = new DbFilter
{
BooleanOperator = "or"
};
DbConditions secondConditions = secondFilter.ConditionSet.Conditions;
secondConditions.Add("Street", "'Somewhere%'", "like");
dbFilters.Add(secondFilter);
dbFilter.Filters.Add(secondFilter);
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.