Hi I am having the following error
{"Unable to cast object of type 'System.Linq.Expressions.MethodCallExpression' to type 'SubSonic.Linq.Structure.ProjectionExpression'."} System.SystemException {System.InvalidCastException}
And My Code is
var results1 = from la in db.LoanApplications join ld in db.LookUpDetails on la.StatusId equals ld.LookUpDetailId where la.UserId == userId && ld.Col5Value.ToLower() == "y" orderby la.LoanAppId descending select new { la.LoanAppId, la.UserId, la.ApplicationDateSubmitted, la.DueDate, la.FundingDate, la.LoanAmount, la.InterestAmount, Status = ld.Col1Value };
But when In debug mode I write results1.ElementAt(0).LoanAppId then It gives me the above given Error
Whats is the reason for this and How may I resolve this?
Regards