I have a class:
public class Author : Entity
{
public virtual string ForeName { get; set; }
public virtual string LastName { get; set; }
public Author() { }
}
and another class X that contains:
public virtual IList<Author> Authors { get; set; }
Is overriding the Equals method in Author the best way to determine whether X already contains an Author?
If you have got list of Authors, as for me the best way to search is dictionary:
OR