Using Dapper Rainbow with a Firebird database

879 views Asked by At

I'm currently trying to use Dapper rainbow as a wrapper for my Firebird database.

The problem is that it seems to be generating SQL for a different type of DB.

The SQL generated is:

select 1 from INFORMATION_SCHEMA.TABLES where TABLE_NAME = @name

Which is causing a "Dynamic SQL error" from Firebird since Firebird doesn't have an INFORMATION_SCHEMA.

Here is my code:

public class USERI{
    public string ID { get; set;}
    public string Name {get; set;}
}

public class DB : Database<DB> {
    public Table<USERI> users { get; set; }
    }

class Program {
    static void Main(string[] args) {
        string connString = String.Format(@"DataSource=localhost;Database={0};
                                    User Id=SYSDBA;Password=masterkey", dbLocation);

        var db = DB.Init(new FbConnection(connString), commandTimeout: 2);
        var users = db.users.First();

    }
}

I have used normal Dapper queries on my DB and it was succesful. How can I make the DB wrapper in Rainbow be aware of the DB type?

0

There are 0 answers