0
我一直在使用本教程为基础 http://code.msdn.microsoft.com/wpapps/Using-Sqlite-with-WP8-52c3c671 和它在App.xaml中创建与此使用.sqlite3文件创建在Windows Phone数据库8
数据库在Windows Phone尝试的SQLitestring dbPath = Path.Combine(
Windows.Storage.ApplicationData.Current.LocalFolder.Path,
"db.sqlite");
if (!FileExists("db.sqlite").Result)
{
using (var db = new SQLiteConnection(dbPath))
{
db.CreateTable<Person>();
}
}
private async Task<bool> FileExists(string fileName)
{
var result = false;
try
{
var store = await Windows
.Storage.ApplicationData.Current.LocalFolder
.GetFileAsync(fileName);
result =true;
}
catch { }
return result;
}
我有一个database.sqlite3文件与我创建的数据库,并添加到我的项目在资产文件夹。 我如何使用该文件在我的Windows Phone应用程序上创建数据库?
其抱怨GetDbPath的返回类型应该是任务和方法应该被标记为异步 我做错了什么或者是正确的? –
Ric
我可以在这个PLZ上多一点帮助吗? :) – Ric
@Ric请检查我的答案编辑 – Jaihind