How do I refresh an existing object using SQLite.NET?

时间:2015-07-28 16:43:24

标签: c# sqlite.net

I'm using SQLite.NET and the SQLite.NET extensions to represent objects coming from a Rest API. This is my workflow:

  • Create an object locally
  • Save it to the DB.
  • On a background thread:
    • Get a copy of the object
    • POST it to the server
    • Update the object with what comes back
    • Save this copy of the object back to the DB
  • Get notified that my object has updated.

At this point, what I want is to refresh my copy of my object with the saved data from the DB. I do not want to throw my object away and create a new one. Calling GetChildren refreshes the children, but it isn't refreshing the properties of the object itself.

How do I refresh an existing object using SQLite.NET?

1 个答案:

答案 0 :(得分:0)

非常迟到的答案,但SQLite.Net的API中不存在此功能。我确定你已经完成了显而易见的事情(拉取记录,获取非关系属性,然后复制它们)。

相关问题