Exemplo n.º 1
0
 public static async Task <int> UpdateAsync(
     this IDbConnection db,
     string tableName, object param)
 {
     return(await db.ExecuteAsync(DynamicQuery.GetUpdateQuery(tableName, param), param));
 }
Exemplo n.º 2
0
        public static async Task <T> InsertAsync <T>(this IDbConnection db, string tableName, object param)
        {
            IEnumerable <T> result = await db.QueryAsync <T>(DynamicQuery.GetInsertQuery(tableName, param), param);

            return(result.First());
        }