AlexSJC
发布于 2023-09-26 / 5 阅读
0
0

Xamarin 使用数据库

public class Database
{
    private const string file = "database.db";

    public static SQLiteConnection Connection { get; private set; }

    static Database()
    {
        var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), file);
        Connection = new(path);
        Log.Info(nameof(Database), "已连接数据库");
    }
}


评论