0
alper created
Support Team
Director
Vijay P. Nallala asks:
Can you please suggest – how we can set the custom guid as “object Type” in Mongo DB
Class
Public class TestClass :Entity<string>
{
public string Id { get; set};
public string FirstName { get; set};
}
Repo- ModelBinding
modelBuilder.Entity<TestClass>(b =>
{
//[BsonRepresentation(BsonType.ObjectId), BsonElement("_id")]
b.CollectionName = "TestMember";
b.BsonMap.MapProperty(x => x.Id).SetElementName("_id");
//TODO SET THE BsonType as ObejctId “NOT AS BINARY”
});
Thanks Vijay
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
2 Answer(s)
-
0
This question has been automatically marked as stale because it has not had recent activity.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)