Using ObjectId instaed of int

What if I want to use ObjectId and have mongo generate the ids for me?
I have this code:
class Post
public ObjectId Id { get; set; }


How do I remove the _id property when updating or inserting but still have it when I query for documents?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.