/// <summary> /// Creates new collection in current database context. /// </summary> public async Task <AResult <Dictionary <string, object> > > Create() { var request = _requestFactory.Create(HttpMethod.Post, ApiBaseUri.Collection, ""); request.SetBody(_parameters); var result = await _connection.RequestQuery <Dictionary <string, Object> >(request); if (!result.Success) { throw new ArangoException(); } return(result); }
/// <summary> /// Retrieves basic information about specified collection. /// </summary> public async Task <AResult <Dictionary <string, object> > > GetInformation() { var request = _requestFactory.Create(HttpMethod.Get, ApiBaseUri.Collection, "/" + _collectionName); var result = await _connection.RequestQuery <Dictionary <string, object> >(request); if (!result.Success) { switch (result.StatusCode) { case 404: throw new CollectionNotFoundException(); default: throw new ArangoException(); } } return(result); }