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

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -