/// <summary> /// Selecter 快速 ListAsync 方法 /// </summary> public static async Task <List <VM> > ListAsync <M, VM>(this IDbConnection conn, QueryOption option) where M : class where VM : class { return(await conn.Selecter <M>().Where(option).ListAsync <VM>()); }
/// <summary> /// Selecter 快速 ListAsync 方法 /// </summary> public static async Task <List <VM> > ListAsync <M, VM>(this IDbConnection conn, QueryOption option, Expression <Func <M, VM> > columnMapFunc) where M : class where VM : class { return(await conn.Selecter <M>().Where(option).ListAsync <VM>(columnMapFunc)); }
/// <summary> /// Selecter 快速 FirstOrDefaultAsync 方法 /// </summary> public static async Task <M> FirstOrDefaultAsync <M>(this IDbConnection conn, QueryOption option) where M : class { return(await conn.Selecter <M>().Where(option).FirstOrDefaultAsync()); }