I did upgrade to the EF 6 and when I do this query is showing this error:
ExecuteReader requires an open and available Connection. The connection's current state is 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));