Example #1
0
        /// <summary>
        /// Execute a truncate query over db
        /// </summary>
        /// <param name="entity">idintify table</param>
        /// <returns></returns>
        public async Task <int> Truncate(T entity)
        {
            string query = _queryHelper.TruncateQuery(entity);

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