public virtual SpecificationBase <T> AddInclude(string includeString) { if (IncludeStrings == null) { IncludeStrings = new List <string>(); } IncludeStrings.Add(includeString); return(this); }
public AndSpecification(ISpecification <T> left, ISpecification <T> right) { _right = right; _left = left; foreach (var inc in _right.Includes) { Includes.Add(inc); } foreach (var inc in _left.Includes) { Includes.Add(inc); } foreach (var incStr in _right.IncludeStrings) { IncludeStrings.Add(incStr); } foreach (var incStr in _left.IncludeStrings) { IncludeStrings.Add(incStr); } if (left.Sort != null) { if (right.Sort != null) { Sort = items => right.Sort(left.Sort(items)); } else { Sort = items => left.Sort(items); } } else if (right.Sort != null) { Sort = items => right.Sort(items); } if (left.PostProcess != null) { if (right.PostProcess != null) { PostProcess = items => right.PostProcess(left.PostProcess(items)); } else { PostProcess = items => left.PostProcess(items); } } else if (right.PostProcess != null) { PostProcess = items => right.PostProcess(items); } Criteria = ToExpression(); }
protected virtual void AddInclude(string includeString) { IncludeStrings.Add(includeString); }
/// <summary> /// Thêm dữ liệu lấy ra dựa vào tree string /// </summary> /// <param name="includeString">Chuỗi string cần include</param> public virtual void AddInclude(string includeString) { IncludeStrings.Add(includeString); }
public Specification <T> AddInclude(string includeString) { IncludeStrings.Add(includeString); return(this); }
public void AddInclude(string spec) { IncludeStrings ??= new List <string>(); IncludeStrings.Add(spec); }
// string-based includes allow for including children of children, e.g. Basket.Items.Product protected virtual void AddInclude(params string[] includeString) { IncludeStrings.Add(string.Join(".", includeString)); }