Entity Framework 5 upgrade from 4
        Posted  
        
            by 
                user1714591
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user1714591
        
        
        
        Published on 2012-11-07T17:06:20Z
        Indexed on 
            2012/11/07
            23:00 UTC
        
        
        Read the original article
        Hit count: 252
        
I'm having an issue with the Where clause in a search, in my original version EF4 I could add a Where clause with 2 parameters, the where clause (string predicate) and a ObjectParameter list such as
var query = context.entities.Where(WhereClause.ToString(), Params.ToArray());
since my upgrade to EF5 I don't seem to have that option am I missing something?
This was originally used to build dynamic where clause such as "it.entity_id = @entity_id" then holding the variable value in the ObjectParameter.
I'm hoping I don't have to rewrite all the searches that have been built out this way, so any assistance would be greatly appreciated.
Cheers
© Stack Overflow or respective owner