public void AddBucket(Bucket bucket) { using (var session = documentStore.OpenSession()) { session.Store(bucket); session.SaveChanges(); } }
private Response AddBucket(string bucketName) { var bucket = new Bucket { Id = bucketName, CreationDate = DateTime.UtcNow }; storage.AddBucket(bucket); var response = new Response { StatusCode = HttpStatusCode.OK }; return response; }