public override IObGroup AddGroupBy(Factory.ObProperty obProperty) { //_Key += "_" + obProperty.TableName + "_" + obProperty.ColumnName; _Key += "_" + obProperty.Key; DbGroups.Add(new DbGroup(obProperty.TableName, obProperty.ColumnName, obProperty.PropertyName)); ObGroupProperties.Add(obProperty); return(this); }
public ObGroup(/*string tableName, string columnName, string propertyName*/ Factory.ObProperty obProperty) { //_Key = "GroupBy_" + obProperty.TableName + "_" + obProperty.ColumnName; _Key = "GroupBy_" + obProperty.Key; DbGroups.Add(new DbGroup(obProperty.TableName, obProperty.ColumnName, obProperty.PropertyName)); //ObProperties.Add(new ObProperty(modelType, columnName)); ObGroupProperties.Add(obProperty); }
public override IObSort AddOrderByDescending(Factory.ObProperty obProperty) { if (List.Any(obj => obj.TableName == obProperty.TableName && obj.ColumnName == obProperty.ColumnName)) { return(this); } Key += "_" + obProperty.TableName + "_" + obProperty.ColumnName + "_False"; List.Add(new DbSort(obProperty, false)); return(this); }
public ObSort(Factory.ObProperty obProperty, bool isAsc) { Key = "OrderBy_" + obProperty.TableName + "_" + obProperty.ColumnName + "_" + isAsc; List.Add(new DbSort(obProperty, isAsc)); }