/// <summary> /// 分组行号函数,例如 MSSQL Row_Number() Over(PARTITION BY ... ORDER BY ... )。返回整形结果。 /// </summary> /// <typeparam name="TParitionBy">分组键类型</typeparam> /// <typeparam name="TOrderBy">排序键类型</typeparam> /// <param name="partitionSelector">用于从元素中提取分组键的函数</param> /// <param name="keySelector">用于从元素中提取排序键的函数</param> /// <param name="orderBy">排序枚举,默认正序</param> /// <returns></returns> public static int PartitionRowNumber <TParitionBy, TOrderBy>(TParitionBy partitionSelector, TOrderBy keySelector, OrderBy orderBy) => DbFunction.PartitionRowNumber <int, TParitionBy, TOrderBy>(partitionSelector, keySelector, orderBy);
/// <summary> /// 行号函数,例如 MSSQL 解析成 Row_Number() Over(Order BY...)。返回整形结果。 /// </summary> /// <typeparam name="TOrderBy">排序键类型</typeparam> /// <param name="keySelector">用于从元素中提取排序键的函数</param> /// <param name="orderBy">排序枚举,默认正序</param> /// <returns></returns> public static int RowNumber <TOrderBy>(TOrderBy keySelector, OrderBy orderBy) => DbFunction.RowNumber <int, TOrderBy>(keySelector, orderBy);