c# - EntityFramework 6 Connection Closed -
i did upgrade ef 6 , when query showing error:
executereader requires open , available connection. connection's current state closed.
code:
var db = new entity2entities(); db.configuration.lazyloadingenabled = true; var ids = db.personbase.sqlquery(utils.query(param, "personbase")) .select(x => x.id); var result = db.employee.where(x => ids.contains(x.id));
ef 6 in alpha state, things can change in future. didnt try maybe have do
db.database.connection.open();
before executing sqlquery method.
Comments
Post a Comment