score:1
Accepted answer
var userandlovedonesquery = await (
from uq in _context.users
where uq.subjectid == request.subjectid
select new
{
user = (from p in _context.persons
where p.id == uq.personid
select p)
.include(x => x.primaryphonenumber)
.firstordefault(),
lovedones = (from profilegroup in _context.profilegroups where profilegroup.userid == uq.id
join profilegroupdetail in _context.profilegroupdetails on profilegroup.id equals profilegroupdetail.profilegroupid
join person in _context.persons on profilegroupdetail.personid equals person.id
select person).include(u => u.primaryphonenumber)
.tolist(),
}).firstordefaultasync(cancellationtoken);
Source: stackoverflow.com
Related Query
- The long expression could not be translated
- The LINQ expression could not be translated and will be evaluated locally
- The LINQ expression could not be translated
- The LINQ expression could not be translated. Eiither rewrite the query in a form that can be translated
- Why could the F# LINQ expression not be translated - at least partially?
- The LINQ expression could not be translated - Entity Framework Core
- The LINQ expression could not be translated about sum of Property TimeSpan
- EF Core: The LINQ expression could not be translated
- System.InvalidOperationException: 'The LINQ expression could not be translated. Either rewrite the query in a form that can be translated
- The LINQ expression 'Expression' could not be translated. Either rewrite the query in a form that can be translated
- InvalidOperationException: The LINQ expression could not be translated
- The LINQ expression could not be translated although ToLists is used
- The LINQ expression 'GroupByShaperExpression: could not be translated while using GROUPBY in LINQ query
- EF Core: The LINQ expression could not be translated - Net Core 3.1
- Get next element from Query after element with specified Id. The LINQ expression could not be translated
- EF Core 3.1 - The LINQ expression could not be translated (left joins with group by)
- EF Core: The LINQ expression could not be translated for a nested List with Generic StartsWith() Expression
- The LINQ expression could not be translated while trying to sort
- The LINQ expression could not be translated - Error with Nullable Id field
- EF Core (LINQ) - The Query expression could not be Translated
- The LINQ expression could not be translated using Shadow Properties in MVC Core
- LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method 'Int32 Int32(System.String)' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method 'Int32 ToInt32(System.Object)' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method 'Int32 Parse(System.String)' method, and this method cannot be translated into a store expression
- The LINQ expression could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation EF Core 3.1
- The LINQ expression could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation
- LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method 'System.String ToString(Int32)' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method 'Double ToDouble(System.String)' method, and this method cannot be translated into a store expression
More Query from same tag
- Add new XEelement and Update XML.Descendent
- how to select elements that not intersec?
- LINQ throwing Query nested too deeply exception
- Display list of distinct book names from LINQ query
- Search for a word in a specific column using EF or linq (C#)
- C# - Entityframework and SQL Server linq nested loop join and hashjoin performance
- group table by foreign key table in mvc5 using linq
- Linq Many to many
- Adding Where in a SelectList with OrderBy in LINQ
- How to filter child collections in Linq
- how to split list using linq
- Creating a list filled with new instances of an object
- SQL to LINQ Left Outer Join with Multiple Conditions
- Web API Dynamic LINQ Search
- LINQ Include a child array of select
- OrderBy in EF linq to entities can't handle the goodness I'm throwing at it.
- List.FindAll() shows error for null column values
- How to use a dictionary property in C# using LINQ
- SQL server database, Select a List of Model A depending on some entries in another List
- Custom Sort Based On Referenced Records
- Can I generate an async method dynamically using System.Linq.Expressions?
- Linq generic GroupBy date and other fields at the same time
- How to use a Distinct on a column using Linq
- Expression... LINQ to Entities only supports casting Entity Data Model primitive typesā€¯
- Sort the two date columns individually and cumulative effect?
- C# EntityFramework Join
- how to get DataGridViewColumns out of IOrderedEnumerable with DataGridviewCell's?
- LINQ to Entity Framwork: return sorted list of related rows
- how to perform a bulk update with a list of objects linq c#
- How to get name of a RavenDB document