Beispiel #1
0
        public void TestUpdateWithVarBinaryMaxColumn()
        {
            var db = DatabaseHelper.Open();
            var blob = new Blob
                           {
                               Id = 1,
                               Data = new byte[] {9, 8, 7, 6, 5, 4, 3, 2, 1, 0}
                           };
            db.Blobs.Insert(blob);

            var newData = blob.Data = new byte[] {0,1,2,3,4,5,6,7,8,9};

            db.Blobs.Update(blob);

            blob = db.Blobs.FindById(1);
            
            Assert.IsTrue(newData.SequenceEqual(blob.Data));
        }
Beispiel #2
0
 public void TestUpsertWithVarBinaryMaxColumn()
 {
     var db = DatabaseHelper.Open();
     var image = GetImage.Image;
     var blob = new Blob
                    {
                        Id = 1,
                        Data = image
                    };
     db.Blobs.Upsert(blob);
     blob = db.Blobs.FindById(1);
     Assert.IsTrue(image.SequenceEqual(blob.Data));
 }