Search code examples
monomonodevelopdblinq

DbLinq and Mono 2.4: Working Together?


Hopefully this is a silly question and there's really a simple solution somewhere out there but...

Has anybody successfully gotten DbLinq to play nicely with Mono 2.4 on Mac OS X 10.5?

I've got my SQLite database ready but for the life of me, I can't find sqlmetal to generate my objects.

I'm guessing I might have to download a previous version of Mono that included sqlmetal, build and install it, and then just use the code generated from that version on Mono 2.4...but I'm hoping to avoid it at all costs.


Solution

  • Using the pre-compiled binary in this case just doesn't work.

    To get a properly generated DbLinq data layer, you have to use the sqlmetal tool included with Mono (but, apparently, not with the pre-compiled binaries for OS X). You have to pull down the Mono trunk (along with all the dependencies) and build Mono from the source.

    Once you build and install Mono from source, you should have the sqlmetal tool. Once you generate your code, it's as easy as including the generated *.cs file and importing Mono.Data.Sqlite.