public byte[] CacheResult(byte[] data) { SearchResult result = JsonConvert.DeserializeObject <SearchResult>( Encoding.UTF8.GetString(data)); _repo.AddResultAsync(result).Wait(); return(Encoding.UTF8.GetBytes( JsonConvert.SerializeObject(result))); }