Circular Reference error when serializing objects. One to many associated objects
<p>I have two simple Lists that auto generated from EF:</p>

<pre><code>public partial class Visitor
{
    public Visitor()
    {
        this.Visits = new HashSet&lt;Visit&gt;();
    }

    public int Id { get; set; }
    public int PermitId { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string MiddleName { get; set; }
    public bool IsValid { get; set; }
    public System.DateTime RegistrationDate { get; set; }
    public byte[] Picture { get; set; }
    public virtual ICollection&lt;Visit&gt; Visits { get; set; }
}

public partial class Visit
{
    public int Id { get; set; }
    public int VisitType { get; set; }
    public System.DateTime VisitDate { get; set; }
    public Nullable&lt;int&gt; Visitor_Id { get; set; }

    public virtual Visitor Visitor { get; set; }
}
</code></pre>

<p>In WCF method i attempted return the following result:</p>

<pre><code>[Serializable]
[DataContract(IsReference = true)]
[KnownType(typeof(Visitor))]
[KnownType(typeof(Visit))]
[KnownType(typeof(ICollection&lt;Visit&gt;))]
public class ServiceVisit : IServiceVisit
{

    public List&lt;Visitor&gt; AllVisitors()
    {
        using (var te = new TurnstileDbEntities())
        {
            te.Configuration.ProxyCreationEnabled = false;

            return te.Visitors.Include("Visits").ToList();
        }
    }
}
</code></pre>

<p>But I received an exception:</p>

<blockquote>
  <p>There was an error while trying to serialize parameter
  <a href="http://tempuri.org/:AllVisitorsResult" rel="nofollow">http://tempuri.org/:AllVisitorsResult</a>. Message InnerException "Object
  graph for type
  "System.Collections.Generic.HashSet`1[[TurnstileWcfService.Visit,
  TurnstileWcfService, Version=1.0.0.0, Culture=neutral,
  PublicKeyToken=null]]" contains cycles and cannot be serialized if
  reference tracking is disabled".</p>
</blockquote>

<p>In all similar treads are advised to do so:</p>

<pre><code>[DataContract(IsReference = true)]
</code></pre>

<p>or use third part serialization library  (Newtonsoft.Json). But it is not my option. Because i don't want use Json in WinForms app.
How can i fix this and what other solutions are there?</p>