score:2
Accepted answer
Your Client
and Carer
both have indirect references to each other via ClientCarer
.
Rather than serving Client
and Carer
up I'd suggest creating a new class / anonymous type with just the specific properties you need.
Source: stackoverflow.com
Related Articles
- Unusual error when returning list of results from API
- LINQ query returns old results when source list is re-initialized
- Avoid Error when No Results from Entity Query
- Error when using Contains within linq query with results from another query
- c# Linq or code to extract groups from a single list of source data
- Updating List using LINQ working when execute from Immediate window, not from code direct
- Error message is given when creating a CSV from a List of Lists which are based on a Datamodel
- Linq error when returning a List inside a List
- Error When Adding Creating List From View
- Linq query returning null when trying to pass a column value from list object
- Limit Number of Results being returned in a List from Linq
- Rules of thumb for when to call ToList when returning LINQ results
- Accessing Results View from variable in code
- Generating the Shortest Regex Dynamically from a source List of Strings
- Linq query to exclude from a List when a property value of List of different type are equal?
- Entity Framework Linq Query to List - Error when using contains: Only primitive types, enumeration types and entity types are supported
- Why do I get a "key already added" error when using the key from a GroupBy in ToDictionary?
- Removing a single item from an enumerable source when the items are equal
- Query in returning Objects from List using LINQ
- Enumerator stuck in endless loop when removing excess items from a List
- Create a Tree from a list of items, when each item contains a reference to its parent
- Linq select strings from list when condition is met and save the index
- Returning just one integer from a list within a list using lambda C#
- Linq is returning too many results when joined
- c# copied property loses reference when referenced object is removed from list
- Is a full list returned first and then filtered when using linq to sql to filter data from a database or just the filtered list?
- creating Linq to sqlite dbml from DbLinq source code
- Left join not bringing all results when you also select a list of other objects in EFCore 3.1.11
- Returning a correct descendant type from a list of base type
- Get 3 results from searching a List of xy Points that satisfies a condition c#
- A more efficient way of showing adds/deletes in a context
- Performing a JOIN in LINQ in C#
- How to run a LINQ sub-query using the Orchard CMS ContentManager? Nhibernate issue?
- How to skip(m).take(n) from a List<T>?
- How would you select the last two instances of multiple sub-categories in Collection
- Implementation of [PARTITION BY] command by LINQ
- Linq how to move all values of two columns to another table
- Entity Framework Linq to Object Mapping
- Can you combine multiple lists with LINQ?
- Convert charArray to byteArray
- Expression Tree for o?.Value
- F# Linq extension methods for custom type using linq query
- Moq and calling back to set a class' values
- Max value LINQ using class
- Reuse the linq table class when selecting from view
- Is this possible in LINQ?
- Is possible with LINQ to extract from an array of objects the value of one property and create a new array?
- Using IQueryable Where with Expressions with more than one parameter
- Lightswitch - C# LINQ Preprocess Query
- LINQ extract dataTable information