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();
}