它们似乎没有在 vssettings 等中导出。我没有找到将它们恢复到早期版本甚至默认的现成 Visual Studio 设置的方法...
恢复所有设置也没有帮助。
我们在 Xamarin.Forms 应用程序中使用 SQLite 数据库来将业务对象保留在模型层中。
业务对象看起来像
[SQLite.Table(nameof(MyBo))]
class MyBo
{
[PrimaryKey, AutoIncrement]
public int ID { get; set; }
public string Name { get; set; }
... etc
}
Run Code Online (Sandbox Code Playgroud)
呼唤
int id1 = conn.InsertAsync(new MyBo(){ ID = 0, Name ="Foo" });
int id2 = conn.InsertAsync(new MyBo(){ ID = 0, Name ="Bar" });
Run Code Online (Sandbox Code Playgroud)
将导致id1 = 1和id2 = 1
conn.Table<T>().ToListAsync()返回具有正确 ID(1 和 2)的对象。
我错过了什么,我期望 InsertAsync 调用返回正确的值,但它总是返回 1!?