views:

531

answers:

3

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.

+1  A: 

Mono 2.6 will include for the first time a preview of DbLinq with Mono. You can take it out for a spin today if you install DbLinq on your own side-by-side with your current Mono setup.

miguel.de.icaza
@Miguel - Thanks for the response. I actually do have DbLinq built and installed side by side with Mono. I installed Mono from the pre-compiled binary for OS X and couldn't find sqlmetal to generate my data access code. I tried compiling DbMetal from DbLinq and couldn't get it working either. Finally, I downloaded the Mono trunk...and I'm currently waiting on the build.
Justin Niessner
+1  A: 

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.

Justin Niessner
+2  A: 

I'd avoid using DBLinq for production code... many of Linq-To-SQL's features aren't implemented, and walking through the source code shows a low level of maturity... many of the methods are not implemented or marked as "unterminated".

...you've been warned!

Mark
Any other suggestions for using SQLite, Linq, and Mono together? I'm open to alternatives.
Justin Niessner
+1 @Mark. We've found some hideous bugs, where DbLinq would compile and execute a Linq expression, but the results would be completely wrong. This was particularly so for any use of GroupBy. It would have been much more palatable if the engine simply threw an IDontDoGroupBy exception.
Marcelo Cantos