1
使用System.Data.SQLite
我打电话给SqliteConnection.CreateFile
。如何在.NET核心中创建SQLite数据库文件?
Microsoft.Data.Sqlite
的等效什么?
使用System.Data.SQLite
我打电话给SqliteConnection.CreateFile
。如何在.NET核心中创建SQLite数据库文件?
Microsoft.Data.Sqlite
的等效什么?
找到System.Data.SQLite源代码。正是这样:
/// <summary>
/// Creates a database file. This just creates a zero-byte file which SQLite
/// will turn into a database when the file is opened properly.
/// </summary>
/// <param name="databaseFileName">The file to create</param>
static public void CreateFile(string databaseFileName)
{
FileStream fs = File.Create(databaseFileName);
fs.Close();
}