I don’t know how to explain it correctly, but I have a collection of classes:
using (var db = new LiteDatabase(@"MyData.db")) {
var _collection = db.GetCollection<TestClass>("mycollection");
}
public class TestClass
{
public TestClass() {
Task.Run(() => {
SomeProperty = ...; //Request to update value from outside
});
}
public int Id { get; set; }
public string SomeProperty { get; set; } = String.Empty;
}
As you can see, a class changes its properties after instantiation from the inside.
How, after changing a property, save it back to the database, but with a new property?
P.S. If I didn’t explain the question well enough or chose the wrong path initially - write about it