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
2 Answer(s)
-
0
Same question https://support.abp.io/QA/Questions/1277#answer-ac625415-03d3-8d1b-abf9-39fc6c6111d3
-
0
This question has been automatically marked as stale because it has not had recent activity.