public void Delete(Dinner dinner)
        {
            //foreach (RSVP rsvp in dinner.RSVPs.ToList())
            //    db.RSVPs.DeleteObject(rsvp);
            //db.Dinners.DeleteObject(dinner);
            var roi = new RiakObjectId(DinnerBucket, dinner.DinnerID);

            _client.Delete(roi);
        }
 public bool Equals(RiakObjectId other)
 {
     if(ReferenceEquals(null, other))
     {
         return false;
     }
     if(ReferenceEquals(this, other))
     {
         return true;
     }
     return Equals(other.Bucket, Bucket) && Equals(other.Key, Key);
 }
 /// <summary>
 /// Creates (or updates) a link to point to the designated object.
 /// </summary>
 /// <param name="ro">The Riak object whose link will be created or updated.</param>
 /// <param name="riakObjectId">The Riak object identifier to be linked to.</param>
 /// <param name="tag">The tag (or name) of the link.</param>
 public static void SingleLinkTo(this RiakObject ro, RiakObjectId riakObjectId, string tag)
 {
     SingleLinkTo(ro, riakObjectId.Bucket, riakObjectId.Key, tag);
 }
        public void GetsWithRiakObjectIdReturnObjects()
        {
            var doc = new RiakObject(TestBucket, TestKey, TestJson, RiakConstants.ContentTypes.ApplicationJson);
            var writeResult = Client.Put(doc);

            writeResult.IsSuccess.ShouldBeTrue();
            writeResult.Value.ShouldNotBeNull();

            var riakObjectId = new RiakObjectId(TestBucket, TestKey);
            var readResult = Client.Get(riakObjectId);

            var otherDoc = readResult.Value;
            otherDoc.Bucket.ShouldEqual(TestBucket);
            otherDoc.Bucket.ShouldEqual(doc.Bucket);
            otherDoc.Key.ShouldEqual(TestKey);
            otherDoc.Key.ShouldEqual(doc.Key);
        }
 public void Get(RiakObjectId objectId, Action<RiakResult<RiakObject>> callback, uint rVal = RiakConstants.Defaults.RVal)
 {
     ExecAsync(() => callback(_client.Get(objectId.Bucket, objectId.Key, rVal)));
 }
 public void Delete(RiakObjectId objectId, Action<RiakResult> callback, RiakDeleteOptions options = null)
 {
     ExecAsync(() => callback(_client.Delete(objectId.Bucket, objectId.Key, options)));
 }
 public Task<RiakResult<RiakObject>> Get(RiakObjectId objectId, uint rVal = RiakConstants.Defaults.RVal)
 {
     return Task.Factory.StartNew(() => _client.Get(objectId.Bucket, objectId.Key, rVal));
 }
 public Task<RiakResult> Delete(RiakObjectId objectId, RiakDeleteOptions options = null)
 {
     return Task.Factory.StartNew(() => _client.Delete(objectId.Bucket, objectId.Key, options));
 }