Hi Everyone,
I need help in following.
Let's consider we have classes Photo, Video, Post, and each of this
classes implements ICommentable.
public interface ICommentable{
IList<Comment> Comments { get; set; }
}
public class Comment{
public ICommentable Target { get; set; }
}
My question is how should I map this situation. ManyToOne and
OneToMany seems not work here because Photo, Video, Post are different
classes and in Comment table should be able some how to mention which
is target.
Any help will be much appriciated.
Thanks.