[DataContract]
public class Match
{
[DataMember]
public Guid Id { get; set; }
public virtual Tour Tour { get; set; }
[DataMember]
public DateTime DateMatch { get; set; }
public virtual Team Home { get; set; }
public virtual Team Guest { get; set; }
public virtual Result Result { get; set; }
}
[DataContract]
public class Result
{
[DataMember]
public Guid Id { get; set; }
public virtual Match Match { get; set; }
public virtual List<Goal> Goals { get; set; }
}
I was trying to do this in Entity Framework when I got the error:
Unable to determine the principal end of an association between the types 'OperationWithTeams.Result' and 'OperationWithTeams.Match'. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.