次のようなエンティティが与えられた場合:
public class Entity
{
public int Id { get; set; }
public ICollection<EntityTwo> EntityTwos { get; set; }
}
public class EntityTwo
{
public int Id { get; set; }
public int TypeId { get; set; }
public int EntityId { get; set; }
}
通常、equalsEntity.EntityTwos
のすべての EntityTwo エンティティを返します。プロパティがそのIDで結合するエンティティを返すようにモデルを調整することは可能ですか?EntityId
Entity.Id
EntityTwo.TypeId == 2