Beispiel #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>());
 }
Beispiel #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));
 }
Beispiel #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());
 }