Esempio n. 1
0
        /// <summary>
        /// Execute an update query over db connection
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task <int> Update(T entity)
        {
            var    dynamicParameters = new DynamicParameters();
            string query             = _queryHelper.UpdateQuery(entity, ref dynamicParameters);

            return(await _connection.ExecuteAsync(
                       query,
                       dynamicParameters,
                       commandType : CommandType.Text,
                       transaction : _unitOfWork.Transaction));
        }