I have two entities:
class User
{
[Column("id")]
public string Id { get; set; }
public IEnumerable<Blog> Blogs { get; set; } = new List<Blog>();
public IEnumerable<string> BlogIds { get; set; } = new List<string>(); // <-- how to implement this?
}
class Blog
{
[Column("id")]
public string Id { get; set; }
[Column("title")]
public string Title { get; set; }
[ForeignKey(nameof(Author))]
public string AuthorId { get; set; }
public User Author { get; set; }
}
I could solve this loading blogs with user and then using a getter, but there should be some more elegant solution.