I would like to write a simple one-to-one relationship between my models.
The exception message I get from sqlite-net
is Don't know about Profile
.
public class User
{
[PrimaryKey]
public int pk { get; set; }
public string first_name { get; set;}
[OneToOne]
public Profile profile { get; set;}
...
}
public class Profile
{
[PrimaryKey]
public int pk { get; set; }
[ForeignKey(typeof(User))]
public string UserID { get; set; }
[OneToOne]
public User user { get; set;}
}
What am I missing here? Thanks