4 Replies Latest reply on Nov 21, 2013 8:08 AM by Alex Keh - Product Manager-Oracle

    Simple Lambda Query does not Execute as Expected


      I am really struggling trying to figure out what's going on with these 2 queries:


      This one works where the variable is defined as a const, i get back the part from the database:

      const string partNumber1 = "1111-1";

      Part firstPart = _context.Set<Part>().First(p => p.PART_NO.Equals(partNumber1));


      This one executes fine,but does not return any values:

      string partNumber2 = "1111-1";

      Part secondPart = _context.set<Part>().First(p => p.PART_NO.Equals(partNumber2));


      I had our DBA capture the query, and it looked good in the failed case, however it could not capture the actual bind parameter, just the statement.


      What is going on here, this should work right?