This question is locked. New answers and comments are not allowed.
I am trying to run the following LINQ query agaist my object model.
IQueryable<FailureReport> FRs = from c in scope.Extent<FailureReport>() select c; FRs = FRs.Where(c => ((c.ActionItems.Where(ai => ai.Assignee.ToLower().Contains(actionItemAssignee.ToLower()))).Count() >= 1)); FRs = FRs.OrderBy(c => c.DateCreated); listOut = FRs.ToList(); |
When I try to run the where clause to limit based on related table, assignee, I get the following error:
- Exception occurred in GetFailureReports: System.NotSupportedException: Execution of 'System.Linq.Enumerable:Where(IEnumerable`1,Func`2)' on the database server side currently not implemented. |
[1068] at Telerik.OpenAccess.Query.QueryContext.PerformDatabaseQuery(Type type, Expression expression, Int32& number, Boolean exec, Int32 numSkip, Int32 numTake) |
[1068] at Telerik.OpenAccess.Query.QueryContext.PerformDatabaseQueryMultiple[T](Expression expression) |
[1068] at Telerik.OpenAccess.Query.ObjectScopeQuery`2.GetEnumerator() |
[1068] at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) |
[1068] at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) |
[1068] at ppiatm.QAReporter.Data.FailureReport.GetFailureReports(DateTime dtStart, DateTime dtEnd, String severity, String description, String project, String wellName, String frNumber, String rigName, String equipment, String contractor, String contractorRefNumber, String actionItemAssignee, IObjectScope scope) in C:\svn\QAReporter\QAReporterDataLayer\FailureReport.PPI.cs:line 204 |
Any ideas why this would not work or a workaround to allow me to filter based on a related table with one to many records.
Thanks,
Josh