[EF-39] Support Find and EF Property syntax Created: 17/Aug/23 Updated: 04/Oct/23 Resolved: 04/Oct/23 |
|
| Status: | Closed |
| Project: | Entity Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Public Preview 1 |
| Type: | New Feature | Priority: | Unknown |
| Reporter: | Damien Guard | Assignee: | Damien Guard |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
In scope for PP1 The EF find method maps to Property on a Where clause (followed by FirstOrDefault with no predicate). Right now this doesn't work as the LINQ provider doesn't know about EF.Properties and we don't yet translate. So, in the case of var a = customers.Find("abc") EF generates customers.Where(c => Property(c, "Id") == "abc").FirstOrDefault() (Technically the "abc" is a parameter but this is fine for illustration purposes) We need to resolve references to EF.Property(x, y) to their actual POCO property. In the case where there is no POCO property (shadow properties) we should throw as we can't support them at this time without changes to the V3 LINQ provider. |