Core/CafeLib.Core/Support/ObjectId.cs
/// <summary>
/// Convert Guid to native ObjectId.
/// </summary>
Convert Guid to native ObjectId.
Convert Guid to native ObjectId .
public static ObjectId AsObjectId(Guid id)
        {
            var bytes = id.ToByteArray().Take(12).ToArray();
            var oid = new ObjectId(bytes);
            return oid;
        }
public static ObjectId AsObjectId ( Guid id ) { var bytes = id . ToByteArray ( ) . Take ( 12 ) . ToArray ( ) ; var oid = new ObjectId ( bytes ) ; return oid ; }
Convert Guid to native ObjectId.
Convert Guid to native ObjectId .
id
Guid