title: Entity Framework 4.1 : The navigation property configured with One-to-One/zero mapping
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8772149/entity-framework-4-1-the-navigation-property-businessuser-declared-on-type">Entity Framework 4.1 : The navigation property ‘BusinessUser’ declared on type ‘Login’ has been configured with conflicting multiplicities</a>  </p>
  </blockquote>
  
  
  
  <p>I am having two entities </p>
  
  <pre><code>BusinessUser { Id(PK), Name,...}
  
  Login { BusinessUserID(PK, FK), Email, Password, etc...}
  </code></pre>
  
  <p>Relationship between <code>BusinessUser</code> and <code>Login</code> is <strong>one-to-zero/one</strong>.</p>
  
  <p>I am having following configurations
  In BusinessUser EF configuration class</p>
  
  <pre><code>this.HasOptional(bu =&gt; bu.LoginInfo)
      .WithOptionalPrincipal(l =&gt; l.BusinessUser);
  </code></pre>
  
  <p>In Login EF configuration class</p>
  
  <pre><code>this.HasRequired(l =&gt; l.BusinessUser)
      .WithOptional(bu =&gt; bu.LoginInfo);
  </code></pre>
  
  <p>I am getting following exception</p>
  
  <blockquote>
    <p>The navigation property 'BusinessUser' declared on type 'Login'  has been configured 
    with conflicting multiplicities.</p>
  </blockquote>
  
  <p>Where I am wrong with my one-to-one/zero configuration in EF 4.1 code first.</p>
  
  <pre><code>public class BusinessUser {
      public virtual int ID { get; set; }
  
      public virtual int BusinessID { get; set; }
  
      public virtual Business Business { get; set; }
  
      public Login LoginInfo { get; set; }
    }
  
   public class Login {
      public virtual int BusinessUserID { get; set; }
  
      public virtual string Email { get; set; }
  
      public virtual string Password { get; set; }
  
      public BUsinessUser BusinessUserInfo { get; set; }
    }
  </code></pre>
  
  <p>Also I am looking for bi-directional.</p>