title: Managing user profiles with SimpleMembership/Sql Server CE, MongoDB
body: <p>I chose to use <code>mongodb</code> as a storage for <em>domain-centric data</em>.
  I was searching for <code>official mongodb providers</code> to integrate them into <code>ASP.NET MVC</code> project to keep a single application database. There are no official providers and available ones don't look mature/stable. So I decided to use simple membership as it is. </p>
  
  <p>How to get rid of <code>Entity Framework</code>-specific code, if possible, from the <code>AccountController</code>?</p>
  
  <p>How would you manage user profiles having both <code>SimpleMembership UserProfile</code> and <code>MongoDB</code> <code>User</code>?</p>
  
  <p><strong>Example</strong></p>
  
  <p>In a separate assembly <code>[project-name].domain</code> there are two classes:</p>
  
  <pre><code>public class Event {
      public DateTime ScheduledDate { get; set; }
      public String Name { get; set; }
      public Location Location { get; set; }
  }
  
  public class User {
      public String Name { get; set; }
      public List&lt;Events&gt; AssociatedEvents { get; set; }
  }
  </code></pre>
  
  <p>Will this be a solution if I add an <code>UserProfileId</code> to <code>User</code>?</p>
  
  <pre><code>public class User {
      public Int32 UserProfileId { get; set; }
      public String Name { get; set; }
      public List&lt;Events&gt; AssociatedEvents { get; set; }
  }
  </code></pre>