Esempio n. 1
0
 /// <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>());
 }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 /// <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());
 }