简体   繁体   中英

Convert PostgreSQL query to Entity Framework

I need to convert the following SQL query to Entity Framework

SELECT * 
FROM "Employee"
CROSS JOIN json_array_elements("Offers"::json)
WHERE value::TEXT IN('1', '3')
ORDER BY "Id" DESC

Can anyone help me?

There's no translation from LINQ to PostgreSQL's particular JSON query syntax.

You can populate collections of entities with Raw SQL Queries .

If the query results don't match an existing entity, you can declare a Keyless Entity Type that matches the query results.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM