title: MongoDB best practice for referencing
body: <p>I'm wondering what the best practice for modelling by using references would be given situation under. I'm using <a href="http://mongorepository.codeplex.com/">MongoRepository</a> library.</p>
  
  <pre><code>public class User : Entity
  {
     publis string Id { get; set; }
     public string Email { get; set; }
     public string Password { get; set; }
  }
  
  public class Post : Entity
  {
     public string Id { get; set; }
     public string Title { get; set; }
     public string Summary { get; set; }
     public DateTime Added { get; set; }
     public User Owner { get; set; }
  }
  </code></pre>
  
  <p>When storing the Post I want only reference to Owner (User) object instead of whole object underlying.</p>
  
  <p>Currently I'm doing it like this, not knowing of better way...</p>
  
  <pre><code>var post = new Post
  {
     Title = "Example title",
     Summary = "asd asd",
     Added = DateTime.Now,
     Owner = new User { Id = "someExistingUserId" }
  };
  postRepository.Update(post); //Save
  </code></pre>
  
  <p>..</p>
  
  <pre><code>//Then to get the post
  var post = postRepository.GetById("previouslySavedPostId");
  post.Owner = userRepository.GetById(post.Owner.Id);
  return post;
  </code></pre>
  
  <p>userRepository and postRepository are of MongoRepository type.</p>
  
  <p>Is this the correct approach to solving my problem using MongoDB with C#/MVC(4)?</p>