This question is locked. New answers and comments are not allowed.
Dear All,
I have a query that executes over three different tables and I need to return the result as an Entities.
I started by creating a custom class to hold my result from the query
Then I created an IQueryable method with the correct linq query to return the result.
Here a sample of the method :
I complied & run the application, when I try to load the query I got an exception says:
Part of the exception:
What am I doing wrong, this was working fine with EF4.
Any help !!
I have a query that executes over three different tables and I need to return the result as an Entities.
I started by creating a custom class to hold my result from the query
Then I created an IQueryable method with the correct linq query to return the result.
Here a sample of the method :
public IQueryable<summaryview> Getsummery_View(int Status) { var results = (from Summary in DataContext.summeries let details = Summary.parents.Where(o => o.id == Summary.id) join Period in DataContext.Periods on Summary.periodid equals Period.periodid where Summary.status == Status && Summary.Transdate >= Period.datef && Summary.Transdate <= Period.datet select new summaryview { period = Summary.periodid, number = Summary.number, dnumber = Summary.dnumber, discriptor = Summary.discriptor, transdate = Summary.transdate, notes = Summary.notes }); return result; }I complied & run the application, when I try to load the query I got an exception says:
Part of the exception:
Load operation failed for query 'Getsummery_View'. An exception occured during the execution of ' Extent<RIAServicesORM.Web.summery>.Select(Summary => new <>f__AnonymousType0`2(Summary = Summary,What am I doing wrong, this was working fine with EF4.
Any help !!