내가 EF 6으로 업그레이드 않았고 내가 할 때 쿼리가이 오류를 보여주고있다 휴관일 :EntityFramework 6 연결
ExecuteReader requires an open and available Connection. The connection's current state is closed.
코드 :
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));
db.Configuration.LazyLoadingEnabled = true; var ids = db.PersonBase.SqlQuery (Utils.Query (param, "PersonBase")). Select (x => x.Id); db.Database.Connection.Open(); var result = db.Employee.Where (x => ids.Contains (x.Id)); –