views:

268

answers:

3

Hi,

I've got Sqlite working in a basic sense for my C# project in Visual Studio 2008 via use of the ADO.net Sqlite wrapper from http://sqlite.phxsoftware.com/.

Question - For a C# winforms newbie what VS2008 data access layer approach would you recommend I look to use for my winforms app, as I need to write/read data from the sqlite database?

Tahnks

+1  A: 

How about using an ORM like Subsonic? SubsonicProject.com

Nils
I was thinking of one of the Microsoft approaches that is integrated with VS2008...(but I'm new to .net)...is there not a way in VS2008 to automatically create the C# wrappers to access the data in the database?
Greg
You mean like using Linq? Check out this related question:http://stackoverflow.com/questions/250071/linq-with-sqlite-linqtosql
Nils
yes - thanks, this is the kind of thing I had in mind - does this mean there is no Microsoft out of the box Linq To Sql for sqlite?
Greg
what about Entity Framework for example too? if there were sqlite support would this be any easier way to get a basic layer in place so I could work in the C# object world and not have to type SQL for my sqlite database?
Greg
Entity Framework is supported by the SQLite ADO provider.There are a few issues with it that can be worked around.See: http://stackoverflow.com/questions/936804/sqlite-with-entity-framework
Nils
A: 

You might want to look at this lightweight SQLite wrapper, which has reflection-based ORM features, and some easy-to-use Linq support: http://code.google.com/p/sqlite-net/

It links directly to the released SQLite library, and has no other dependencies.

Govert
A: 

I've found that the http://sqlite.phxsoftware.com/ works fine with Entity Framework. VS2010 doesn't seem to create the correct SQL for a "create DB from model" approach, however the "create Model from DB" approach works fine.

Greg