예제 #1
0
 /// <summary>
 /// 获取最大值。
 /// </summary>
 /// <typeparam name="TModel">当前模型类型。</typeparam>
 /// <param name="db">数据库实例。</param>
 /// <param name="column">当前列。</param>
 /// <param name="expression">条件表达式。</param>
 /// <param name="cancellationToken">取消标识。</param>
 /// <returns>返回当前值。</returns>
 public static Task <int> MaxAsync <TModel>(this IDbContextBase <TModel> db,
                                            Expression <Func <TModel, object> > column, Expression <Predicate <TModel> > expression = null,
                                            CancellationToken cancellationToken = default)
 {
     return(db.MaxAsync(column, expression, ConvertInt32, cancellationToken));
 }