public void Should_insert_two_blobs_and_a_date() { using (ISession s = OpenSession()) { var blob = new Byte[1024*24]; for (int i = 0; i < blob.Length; i++) { blob[i] = 65; } using (ITransaction tx = s.BeginTransaction()) { var tb = new TwoBlobs { Blob1 = blob, Blob2 = blob, Id = 1, TheDate = DateTime.Now }; s.Save(tb); tx.Commit(); } } }
public async Task Should_insert_two_blobs_and_a_dateAsync() { using (ISession s = OpenSession()) { var blob = new Byte[1024 * 24]; for (int i = 0; i < blob.Length; i++) { blob[i] = 65; } using (ITransaction tx = s.BeginTransaction()) { var tb = new TwoBlobs { Blob1 = blob, Blob2 = blob, Id = 1, TheDate = DateTime.Now }; await(s.SaveAsync(tb)); await(tx.CommitAsync()); } } }