Ejemplo n.º 1
0
 /// <summary>
 /// 获取最小值。
 /// </summary>
 /// <typeparam name="TModel">当前模型类型。</typeparam>
 /// <param name="db">数据库实例。</param>
 /// <param name="column">当前列。</param>
 /// <param name="expression">条件表达式。</param>
 /// <returns>返回当前值。</returns>
 public static int Min <TModel>(this IDbContextBase <TModel> db,
                                Expression <Func <TModel, object> > column, Expression <Predicate <TModel> > expression = null)
 {
     return(db.Min(column, expression, Convert.ToInt32));
 }