Пример #1
0
 public static void Update(this IDbConnection cnn, string tableName, dynamic param, string PKName, IDbTransaction tran)
 {
     SqlMapper.Execute(cnn, DynamicQuery.GetUpdateQuery(tableName, param, PKName), param, tran);
 }
Пример #2
0
        public static T Insert <T>(this IDbConnection cnn, string tableName, dynamic param, string PKName, IDbTransaction tran)
        {
            IEnumerable <T> result = SqlMapper.Query <T>(cnn, DynamicQuery.GetInsertQuery(tableName, param, PKName), param, tran);

            return(result.First());
        }