title: Using same C# Poco classes with in mongodb and Entityframework
body: <p>My Domain Classes is as follow:</p>
  
  <pre><code>public class Author
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public IList&lt;Post&gt; Posts { get; set; }
  }
  
  public class Blog
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public IList&lt;Post&gt; Posts { get; set; }
  }
  
  public class Post
  {
      public int Id { get; set; }
      public string Title { get; set; }
      public string Content { get; set; }
      public Author Author { get; set; }
      public Blog Blog { get; set; }        
  }
  </code></pre>
  
  <p>As you see I have absolutely not any data annotation or attributes for entity framework annotations, and I Configure Entity framework related annotations in another classes for each one using entity framework fluent api.
  now I want to replace entity framework with MangoDb.</p>
  
  <p>but in mongo db I needed to place an attribute at list for Id like below:</p>
  
  <pre><code>public class Author
  {
      [BsonElement("_id")]
      [BsonRepresentation(BsonType.ObjectId)]
      public int Id { get; set; }
      public string Name { get; set; }
      public IList&lt;Post&gt; Posts { get; set; }
  }
  </code></pre>
  
  <p>My Question is is there any way to this configuration outside in another class, and don't touch my poco classes like what we use in entity framework's fluent api. </p>