我需要在hstore列中生成值查询
var collection = await _context.Settings
.Select(b => new
{
SettingId = b.SettingId,
SettingParentId = b.SettingParentId,
SettingValue = (b.SettingValue.ContainsKey('key') ? b.SettingValue['key'] : "")
})
.OrderBy(x => x.SettingId)
但是不是最好的方法,是否存在任何实现此查询的方法以转换为该sql?
SELECT setting_id,
setting_parent_id,
setting_value -> 'key' AS setting_value
FROM settings
[This is the issue hstore的跟踪查询翻译。