public void TestIncompleteKey() { // [START incomplete_key] Key incompleteKey = _db.CreateKeyFactory("Task").CreateIncompleteKey(); Key key = _db.AllocateId(incompleteKey); // [END incomplete_key] Assert.True(IsValidKey(key)); }
public void AllocateId() { string projectId = _fixture.ProjectId; string namespaceId = _fixture.NamespaceId; // Snippet: AllocateId DatastoreDb db = DatastoreDb.Create(projectId, namespaceId); KeyFactory keyFactory = db.CreateKeyFactory("message"); Key key = db.AllocateId(keyFactory.CreateIncompleteKey()); // End snippet }