/// <summary> Searches for all <typeparamref name="TEntity"/> that matches the conditions defined by the specified predicate, and returns the result as <see cref="IEnumerable{TEntity}"/>. </summary>
        ///
        /// <typeparam name="TEntity"> Type of the entity. </typeparam>
        /// <param name="transaction"> The transaction. </param>
        /// <param name="expression">The expression.</param>
        /// <param name="fieldToSkip"> (optional) the field to skip. </param>
        ///
        /// <returns> . </returns>
        public IEnumerable <TEntity> FindAll <TEntity>(OracleTransaction transaction, Expression <Func <TEntity, bool> > expression, string fieldToSkip = null)
            where TEntity : class, new()
        {
            var entityInfo = RepositorySetting.GetEntity2Info(typeof(TEntity));

            var commandText = string.Format("{0}_Find", entityInfo.DbObjectName);

            return(SimpleAccess.ExecuteEntities <TEntity>(transaction, commandText, CommandType.StoredProcedure
                                                          , fieldToSkip, parameters: new OracleParameter("@whereClause", DynamicQuery.GetStoredProcedureWhere(expression, entityInfo))));
        }
        /// <summary> Searches for <typeparamref name="TEntity"/> that matches the conditions defined by the specified predicate, and returns the first record of the result. </summary>
        ///
        /// <typeparam name="TEntity"> Type of the entity. </typeparam>
        /// <param name="expression">The expression.</param>
        /// <param name="fieldToSkip"> (optional) the field to skip. </param>
        ///
        /// <returns> . </returns>
        public TEntity Find <TEntity>(Expression <Func <TEntity, bool> > expression, string fieldToSkip = null)
            where TEntity : class, new()
        {
            var entityInfo = RepositorySetting.GetEntityInfo(typeof(TEntity));

            var commandText = string.Format("{0}_Find", entityInfo.DbObjectName);

            return(SimpleAccess.ExecuteEntity <TEntity>(commandText, CommandType.StoredProcedure
                                                        , fieldToSkip, parameters: new MySqlParameter("@whereClause", DynamicQuery.GetStoredProcedureWhere(expression, entityInfo))));
        }