问题
Always return empty results
var collection = await _context.Settings
.Select(s => new
{
s.SettingId,
s.SettingParentId,
SettingValue = s.SettingValue.GetProperty(lang)
})
.Where(s => EF.Functions.JsonExists(s.SettingValue, lang))
.ToListAsync();
I try return only key from json but always return empty, when remove "select" works fine but i need only one key
This is the model
public class Setting
{
public string SettingId { get; set; }
public string SettingParentId { get; set; }
public JsonElement SettingValue { get; set; }
}
来源:https://stackoverflow.com/questions/61995777/entity-framework-core-postgresql-json-query