Trouble with mongoDB. The property '_id' of type … cannot use element name '_id' - cSharp Coder

Latest

cSharp Coder

Sharp Future

Wednesday, May 19, 2021

Trouble with mongoDB. The property '_id' of type … cannot use element name '_id'

 _id is reserved by MongoDb. Try using "Id" instead.

OR

[BsonElement("ProductList")]
[Display(Name = "ProductList")]
public List<string> ProductList { get; set; }

No comments:

Post a Comment