public virtual DataTablesResult GetDataTableResult(DataTablesResultType type) { if (_tbResults.ContainsKey(type)) { return(_tbResults[type]); } var result = new DataTablesResult(this, type); if (type.HasFlag(DataTablesResultType.DifferenceRows)) { result.AddRange(Rows.Where(r => r.Cells.Length > 0)); } if (type.HasFlag(DataTablesResultType.NotFoundRows)) { result.Add(NotFoundRows); } if (type.HasFlag(DataTablesResultType.IdentityRows)) { result.AddRange(Rows.Where(r => r.Cells.Length == 0)); } _tbResults[type] = result; return(result); }
public DataTablesResult(ComparisionResult comparisionResult, DataTablesResultType resultType) { ComparisionResult = comparisionResult; ResultType = resultType; Table = comparisionResult.Source.Table.Clone().AllowDbNull(); CompareTable = comparisionResult.Source.CompareTable.Clone().AllowDbNull(); }