public async Task <Metadata> ListAllAsync()
        {
            var requestUri = _service.GetResourceUrl("EntityDefinitions?$select=LogicalName,LogicalCollectionName,DisplayName,PrimaryIdAttribute,PrimaryNameAttribute");

            var response = await _service.SendRequestAsync(HttpMethod.Get, requestUri);

            if (!response.IsSuccessStatusCode)
            {
                throw new ApplicationException($"Remote call returned {response.StatusCode}");
            }

            var content = await response.Content.ReadAsStringAsync();

            var metadata = JsonConvert.DeserializeObject <Metadata>(content);

            return(metadata);
        }