here are a couple of options:
- look at using another context to implement your materializationrepositories and have it backed by an in memory database such as effort, if that's still working nowadays.
- re-implement the 'include' functionality yourself on the materialization. the expression can be broken down to find the type of the navigation property. using naming conventions you can work out what foreign key property you need to interrogate to get the correct identifier. to find the target repository you could use reflection over the materialization looking for the public property of type ienumerable of the type of the navigation property. as long as you knew the name of the primary key of the target entity (by convention, say) you could then use the foreign key value to find it.
if you have a small number of entity types you'd probably be better off having some kind of switch statement and do some of it manually rather than via reflection.
apologies that this isn't a fully worked through implementation, but i hope it leads in the right direction.
- How do I mimic the functionality of IQueryable<T>.Include(Expression<Func<T,TProperty>> path) in my custom collection?
- How do I find the text within a div in the source of a web page using C#
- How to count the number of code lines in a C# solution, without comments and empty lines, and other redundant stuff, etc?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- How does linq actually execute the code to retrieve data from the data source?
- How can I write the following code more elegantly using LINQ query syntax?
- How to code the partial extensions that Linq to SQL autogenerates?
- How to change the default OrderBy functionality so that it orders by a given value first?
- How can we express the following code using query expression?
- How to change the precision and the scale of decimal globally through code first?
- How to swap the data source associated with a Linq query?
- How to write this code using the Linq Extension Method-Syntax?
- is it possible to mimic the functionality of ms-access with c#?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- How do I determine the source of unpredictable LINQ query results?
- How does VS Code metrics do the math
- How would you write this C# code (that uses the yield keyword) succinctly in Ruby?
- How to simplify the code Using LINQ
- How to write the same code using Lambda Expression
- How to write aggregate query in LINQ reusing part of the select code
- How to execute code as a part of the LINQ query
- How do I remove duplicate code in the query?
- How can i make this code more optimized - How can i replace the forloop.?
- How I can improve the code using lambda expressions?
- How can I optimize the following code faster?
- How to fix the following code so that it is ordered?
- How to assign LINQ Query to a variable and then use it later in the code
- How to convert a string to C# code in the SELECT of C# LINQ
- How to convert the following code to LINQ format?
- How to convert the following foreach loop to linq code format?
More Query from same tag
- Is recursive query possible in LINQ to Entities
- Compare 2 Collections and get Modified items
- How to create a dynamic linq query for filter based on ria service?
- Select data from database where date in current month
- Need help converting a nested SQL statement to LINQ
- In LINQ, can I select multiple items?
- Linq Query Help
- Cannot initialize type 'CollegeDetail' with a collection initializer because it does not implement 'System.Collections.IEnumerable'
- Creating XML with LINQ in C#
- Trying to read XML attributes via LINQ
- How do I select specific element name by using LINQ?
- Combine List of like DataTables
- Complex Linq Grouping
- Linq average of dynamic double
- Getting error when fetching data from Sql server compact using linq
- Which query expression would be equivalent to the following LINQ query?
- Generic LINQ extension for calculating weighted average in Visual Basic 2010
- Grouping objects into a period of time to produce minimal groups
- Text search like SQL COLLATE Latin1_General_CI_AI with LINQ
- The binary operator Multiply is not defined for the types 'System.Int32' and 'System.Double'.
- difference between select and where in LINQ
- How to intercept Linq filters
- linq expression as parameter
- Can't loop children of returned XML Nodes in C#
- How to optimize the below code, requirement is to read the configuration from the xml on the object initialization event
- Linq Query Returns Incorrect Result Set
- Linq select based on IEnumerable property
- Data not getting displayed in jqgrid
- ObjectSet<T>.AddObject() vs. EntityCollection<T>.Add()
- LINQ query in C# using string on the fly to ORDER data