Example #1
0
        public static void UpdateJObject(this SharpDBConnection connection, JObject jobject)
        {
            JValue idToken = (JValue)jobject["Id"];

            object documentId = idToken.Value;

            byte[] documentIdBytes = connection.Serializer.SerializeDocumentId(documentId);

            BsonSerializer serializer = connection.Serializer as BsonSerializer;

            byte[] blob = serializer.SerializeFronJObject(jobject);

            connection.UpdateInternal(documentIdBytes, blob);
        }
Example #2
0
 public static void UpdateBinary(this SharpDBConnection connection, byte[] documentIdBytes, byte[] blob)
 {
     connection.UpdateInternal(documentIdBytes, blob);
 }