c# - Using Query Builder Methods against DbContext -


i use "query builder methods" on dbcontext following:

using (var context = new mydbcontext()) {     var query = context.myentities.where("id = @id", new objectparameter("id", 1)); } 

but cannot resolve specific overload of where. missing here?

using solved problem:

var objectcontext = ((iobjectcontextadapter) context).objectcontext; var query = objectcontext.createobjectset<myentities>().where("it.id = @id", new objectparameter("id", 1)); 

Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -