Neo4jClient c#动态设置的位置

本文关键字:位置 设置 动态 Neo4jClient | 更新日期: 2023-09-27 18:00:55

我有这个查询:

var query = client.Cypher
               .Match("(store:Store)")
               .Where("has(store.en_GB)")
               .Return<Store>("store");
        return query.Results.ToList();

我想要的是能够从一个名为locale的变量中设置"en_GB",但我不知道这怎么可能。

我想它可能和一样简单

.Where("has(store.{param})")
.WithParam("param",region)

但那没用,有可能吗。请帮忙。

Neo4jClient c#动态设置的位置

类似的东西?

var locale = "en_GB";
var query = client.Cypher
               .Match("(store:Store)")
               .Where(String.Format("has(store.{0})", locale))
               .Return<Store>("store");
        return query.Results.ToList();