示例#1
0
        public static async Task <System.Data.Common.DbDataReader> TryExecutingSelectQueryDataReader(MySqlConnection connection, DbCommand <T> command, T entity = default(T))
        {
            MySqlCommand mySqlCommand = command.GetCommand(connection, (new T() as IDbTableAssociate).GetAssociatedDbTableName(), entity);

            return(await mySqlCommand.ExecuteReaderAsync());
        }
示例#2
0
        public static async Task <object> TryExecutingScalarRead(MySqlConnection connection, DbCommand <T> command, T entity = default(T))
        {
            MySqlCommand mySqlCommand = command.GetCommand(connection, (new T() as IDbTableAssociate).GetAssociatedDbTableName(), entity);

            return(await mySqlCommand.ExecuteScalarAsync());
        }
示例#3
0
        public static async Task <DbStatus> TryExecutingCRUDQuery(MySqlConnection connection, DbCommand <T> command, T entity)
        {
            MySqlCommand mysqlcommand = command.GetCommand(connection, (entity as IDbTableAssociate).GetAssociatedDbTableName(), entity);
            await mysqlcommand.ExecuteNonQueryAsync();

            return(DbStatus.SUCCESS);
        }