Uploaded image for project: 'Entity Framework'
  1. Entity Framework
  2. EF-39

Support Find and EF Property syntax

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • Public Preview 1
    • Affects Version/s: None
    • None

      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.

            Assignee:
            damien.guard@mongodb.com Damien Guard
            Reporter:
            damien.guard@mongodb.com Damien Guard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: