MongoDB C# driver: Using Linq to get Guid returns nothing -
The following is the code I am using to query the database. Variable "filter" is a linq expression It seems that I can use this code to get the data using the Object Ed or any other value which can be in the document. But when I keep a guid and try to regain it, then there is no return. Is there anything that I am doing wrong, or is there a limit on the words of Googds on Mongodybi? Edit: To make a bit more clear, I have tried the solution shown here in the previous comment: It I do not even give a result that the data I am trying to get is only the _id field. used to retrieve this object The unit to be done is a property named ID only, which I understand, translates into the Mogo document in the _id field. So I tried to retrieve the ID property. Still no results. This was an error in my part. It seems that the gin that was returned back was not in the correct format of the viewer I used to be. Robomongo they like the default to call some LegacyUUID, but this is not the same format. As the Net Guid. I need to change the viewer's options, because I have to display the right track to see it. _dbSet = mongoDatabase.GetCollection (collectionname); Var query = _dbSet.AsQueryable & lt; TEntity & gt; (); If (filter! = Null) {query = query.Where (filter); } Return query. Toolist ();
{"_id": LUUID ("e5bdda3b-ae6a-d942-bd43-c8c7a6803096")}
Comments
Post a Comment