LINQ to Entities does not recognize the method 'System.String Last[String](System.Collections.Generic.IEnumerable`1[System.String])' method, and this method cannot be translated into a store expression.
Hi,
I am executing the following query:
var testCases1 =
dbContext.CaseMasters.Where(x => x.VersionMasters.Any(s => s.IsDeleted && x.TestCaseID == s.TestCaseID
&& s.SupportedVersion.VersionID == s.SupportedVersionId
&& s.SupportedVersion.VersionBranches.Any(b => b.Branch. == branchName))
&& x.ProjectsMaster.TestProjectID == x.TestProjectID).AsEnumerable();
int count1 = testCases1.Count();
I am getting the error "LINQ to Entities does not recognize the method 'System.String LastString' method, and this method cannot be translated into a store expression."
May I know what am I doing wrong ? Please help me resolve the issue.
Kindly waiting for your response.
Thanks,
Santosh