Which Data access technology to use for Monotouch

Go To StackoverFlow.com

2

I'm just wondering what people are using for a Data Access Layer in Monotouch? I'm working on a CRUD based app, and looking for something in between writing inline SQL or rolling my own ORM, and trying to wedge Entity Framework into the mix when it's not supported.

I'm tempted to try and use Simple.Data, but I'm not sure if it would even compile under Mono.

2012-04-05 00:24
by Kye


3

The answers depends on whether you want to store the data on-device or off (or, of course, both).

For on-device storage, you can use the Sqlite database baked into iOS and access it through the Mono.Data.Sqlite driver.

For off-device storage, I would recommend using a self-baked web service.

2012-04-05 00:57
by competent_tech
The Sqlite assembly would still require inline SQL wouldn't it - Kye 2012-04-05 12:49
Yes, it does require inline SQL, it doesn't support stored procs. What we do is use reflection to generate the SQL based on the properties in the class that needs to be written, which greatly reduces the amount of SQL that has to be written and maintained - competent_tech 2012-04-05 16:22
There's also Frank Krueger's SQLite.Net binding (which is what Miguel used in TweetStation): https://github.com/praeclarum/sqlite-net which has an Orm built-in - jstedfast 2012-04-06 01:26
Ads