Are there any classes that can be queried / modified like a SQL DB but is entirely local and internal to the program?
I am aiming to write a program that needs to have a local data source with all data saved in a file, but I would like to be able to query this information store just as I would a DB; LINQ compatibility would be a huge plus.
The data would only be accessible when the program was running meaning, there would be no other process running to serve the data such as SQL server.
You can use SQL Server Compact Edition. It is hosted in-process and uses a
.sdffile locally. It works with LINQ and the LINQ-to-SQL designer. To use it, you’ll just need to add a reference to System.Data.SqlServerCe.dll. It’s very lightweight, familiar, and has excellent support in Visual Studio.On a side note, the Visual C++ IDE team is using this database for their C++ IntelliSense information in Visual Studio 2010, replacing the old .ncb files. Based on their stated goals going into the project (rewriting the C++ IDE for massively improved IntelliSense performance and stability), seeing it used here says a lot.