Embedding a SQL localdb database in C#.Net

2019-05-19 23:21发布

I want to create an application and for that I need to have a database. By searching Google I came to know that for my purpose SQL localdb will be good as it is light and fast. Kindly tell me the procedure for embedding this database in my program. I want to create a desktop application which can run on any Windows machine.

4条回答
在下西门庆
2楼-- · 2019-05-19 23:39

I maintain a C# wrapper to the SQL LocalDB API in GitHub which is also available in NuGet. It will allow you to manage instances of SQL LocalDB in your application.

查看更多
神经病院院长
3楼-- · 2019-05-19 23:43

Sql CE may be a good fit. Scott Guthrie posted about implementing this - http://weblogs.asp.net/scottgu/archive/2011/01/11/vs-2010-sp1-and-sql-ce.aspx

查看更多
Melony?
4楼-- · 2019-05-19 23:47

I've had success using SQL Express in that way.

The most widely deployed database like you describe is SQLite. I would check that out as well.

SQLite HERE

Using a C# wrapper HERE

Or a C# port of SQLite HERE

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-05-19 23:51

you can use Siaqodb,it is a C# written db and it is designed for embedded envs - http://siaqodb.com

查看更多
登录 后发表回答