ADO.Net doesn't give you out of the box support for relationships either. It only gives you raw classes like SQLCommand
and SQLDataReader
.
I would highly recommend sqlite-net, as it is a huge timesaver in being an ORM.
You can setup foreign keys by calling manual SQL statements in sqlite-net, which is the same you would do with ADO.Net anyway.
So with sqlite-net, there are several ways you could setup your database:
- Call sqlite-net's APIs for creating tables based on your C# classes, then add things it doesn't support with manual SQL like foreign keys and indexes
- Include an empty database with your app with the full schema already setup
- Create the entire database with a raw SQL script
I tend to go with option #2 if I want full control of the database schema (and it's a little easier to include a database file I made in SQLite Expert). sqlite-net should work with an existing database just fine.