Possible Duplicate:
How to set primary key in mongodb?
As I understood _id is generated by mongodb. Is there any way to set it manually? And if so, how to do it using C# driver?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I managed to find answer by myself. For C# driver it is enough to give the name
Idor_idto desired property, and not to haveObjectIdtype property in your class. Then inside driver somehow decide that this property is_idfor your data in mongodb.