public DataParameter(string name, object value, DataParameterType providerType, int size) { this.name = name; this.value = value; this.providerType = providerType; this.size = size; }
/// <summary>This method is for grouping all conditions that follow, if openGroup is set to false then it closes the group, if true it opens a new grouping /// <example>example: /// <code> /// var plan = _GeneralDataRepository.GetWhere<Plan>(new List<GeneralDataParameter> { /// new GeneralDataParameter("Date",date), /// new GeneralDataParameter(true, DataParameterType.Or) <- this is the start of a group and will have an 'OR' before it opens /// new GeneralDataParameter("Id",1) /// new GeneralDataParameter("Id",2) /// new GeneralDataParameter("Id",3) /// new GeneralDataParameter(false) <- this is the end of the group /// })?.FirstOrDefault(); /// </code> /// gets records that match a date or Id 1, 2 or 3: /// </example> /// </summary> public GeneralDataParameter(string field, object value, DataConditional conditional = DataConditional.EqualTo, DataParameterType multiConditionType = DataParameterType.And) { Field = field; Value = value; Conditional = conditional; MultiConditionType = multiConditionType; }
/// <summary>This method is for grouping all conditions that follow, if openGroup is set to false then it closes the group, if true it opens a new grouping /// <example>example: /// <code> /// var plan = _GeneralDataRepository.GetWhere<Plan>(new List<GeneralDataParameter> { /// new GeneralDataParameter("Date",date), /// new GeneralDataParameter(true, DataParameterType.Or) <- this is the start of a group and will have an 'OR' before it opens /// new GeneralDataParameter("Id",1) /// new GeneralDataParameter("Id",2) /// new GeneralDataParameter("Id",3) /// new GeneralDataParameter(false) <- this is the end of the group /// })?.FirstOrDefault(); /// </code> /// gets records that match a date or Id 1, 2 or 3: /// </example> /// </summary> public GeneralDataParameter(bool openGroup, DataParameterType multiConditionType = DataParameterType.And) { MultiConditionType = multiConditionType; IsGroup = true; OpenGroup = openGroup; }
public DataParameter(string name, DataParameterType providerType) { this.name = name; this.providerType = providerType; }