New Posts New Posts RSS Feed: PassthruEsqlQuery
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

PassthruEsqlQuery

 Post Reply Post Reply
Author
mbevins1 View Drop Down
Newbie
Newbie


Joined: 16-Jan-2009
Posts: 27
Post Options Post Options   Quote mbevins1 Quote  Post ReplyReply Direct Link To This Post Topic: PassthruEsqlQuery
    Posted: 14-Sep-2009 at 10:09am
I am trying to run a query that looks like this:
 

parameterizedEsql =

SELECT VALUE oo FROM

Employees AS oo

WHERE oo.EmployeeID NOT IN

(SELECT DER.EmployeeID FROM DailyEmployeeRoute as DER WHERE DER.DailyVehicleRouteID IN

(SELECT DailyVehicleRouteID FROM DailyVehicleRoute as DVR WHERE DVR.RouteDate = '9/9/2009' ))

AND oo.isActive =1

AND oo.OperationID = 1

 

var query = new PassthruEsqlQuery(typeof(Employee), parameterizedEsql);

When i run it I get this error:
'DailyEmployeeRoute' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly.
 
 
How do I go about running a query like this?
 
 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 14-Sep-2009 at 2:13pm

EF is expecting an EntitySet named "DailyVehicleRoute" in the conceptual model.  If you've used the pluralizer, the name is most likely "DailyVehicleRoutes".

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down