I have this
var d = $"'$.{ propertyName}'";
var propertyNameParam = new SqlParameter("@propertyName", d);
var sql = "select * FROM Items WHERE JSON_VALUE(Attributes, @propertyName) like '%5151515151%'";
count = dbContext.Items.FromSql(sql, propertyNameParam).Count();
but I get this error
System.Data.SqlClient.SqlException: 'The argument 2 of the "JSON_VALUE or JSON_QUERY" must be a string literal.'
but I put it in single quotes in the first line.