Let us assume I have these two objects
class Customer {
[PrimaryKey]
public string id;
[??????]
public List<int> addresses;
}
and
class Address {
[PrimaryKey, AutoIncrement]
public int id;
public string street;
public int number;
}
Is there a way to use the SQLite.NET ORM to save the Customers object? cause I'm having a really hard time saving lists.
If there is no such way, is there some sort of event I can implement or method I can override so that when an object gets loaded code will trigger?
I was thinking something along the lines of adding [Ignore] above the list of addresses and when the event triggers I can use SQLite.net to load the ids of the addresses from another table
Thanks in advance for any help you can provide
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…