68 questions
0
votes
0
answers
92
views
EF Compile Query and Configurable Constraints
I have been looking into this, and I haven't been able to find an answer.
We are using EF 6.0 in C#, I was hoping to use the EF Compiled query to avoid some Dynamic SQL.
We have a set of Constraint ...
4
votes
1
answer
361
views
How to fix "System.InvalidOperationException: Invalid attempt to call Read when reader is closed" when invoking the Compiled Query
When calling ToList() after invoking the compiled query I sometimes(!) receive an exception - System.InvalidOperationException: Invalid attempt to call Read when reader is closed.
The DB context is ...
1
vote
2
answers
277
views
LINQ compiled query select sum multiple columns
I have a table:
ForObjectTypeID (short, PK)
ForObjectID (int, PK)
UserID (int, PK)
Upvote (bool)
ShadowBannedVote (bool)
Given an ObjectTypeID and ObjectID, I wish to return a Tuple<int, int, int&...
1
vote
1
answer
73
views
GenericDataRepository with Compiled Queries
I have a MVC project with many layers(View,Model,DataAccess,Business) and I am using GenericDataRepository in my DataAccessLayer. I would like to enhance the GenericDataRepository's performance with ...
11
votes
1
answer
10k
views
Is all the query in Entity framework 6 is already compiled?
I want to optimized my queries in Entity Framework 6.1.3, so I need to know that whether queries are already CompiledQueries or I need to write them manually as CompiledQuery?
Thanks in advance.
2
votes
0
answers
400
views
Compiled query replacement for .Net 4.0 and EF6
I have an Asp.Net MVC application built with .Net 4.0 and EF6. To improve performance of the application, I came across various posts and got to know that we must have compiled queries to drastically ...
0
votes
0
answers
181
views
Linq to Sql CompiledQuery references disposed DataContext
In our backend app based on .NET 4.6, we use a lot of Linq To Sql compiled queries. Analyzing my application with dotMemory, I noticed that some of them have a reference to the (now disposed) ...
13
votes
2
answers
5k
views
How do compiled queries in slick actually work?
I am looking for a detailed explanation about the execution of compiled queries. I can't understand how they just compile once and the advantage behind their use
0
votes
1
answer
61
views
Stackoverflow Exception with LinqToSQL compiled queries
We're experiencing a strange situation where a LinqToSQL that has compiled queries within it causes a stackoverflow exception when ran locally but when in a live environment runs fine without any ...
0
votes
0
answers
66
views
DataContext CompiledQuery throws NullReferenceException
I have DataContext as a connection to my database and also use pre-compiled queries (CompiledQuery).
Here is my code:
public static RichTextValue GetRichTextValue(this DataManager db, string key, ...
0
votes
2
answers
295
views
Performance - get data through navigation property vs compiled query
I have compiled queries for both, the main entity customer and for related entities(orders).
var customer = MyService.GetCustomer<Customer>().where(c => c.Id == fooId).ToList();
var ...
2
votes
5
answers
3k
views
laravel Eloquent ORM - How to get compiled query?
In Laravel 4.2 I want to get Compiled Query.
This is what i have:
$product = Product::where('id', '=', '100')->get();
I want compiled query like:
select * from products where id = 100
Purpose ...
12
votes
1
answer
20k
views
Entity Framework 6 Compiled LINQ Query
I'm trying to improve performance of a web application by caching a query.
public static Func<myEntity, List<HASHDuplicates>, IQueryable<FormResponse>> ...
1
vote
1
answer
323
views
How can I "warm up" a LinqToSql precompiled query?
In LinqToSql, precompiled queries are great - but it still requires me to take the compilation performance hit the first time the query is used.
I would like to 'warm up' these precompiled queries in ...
1
vote
0
answers
114
views
Map model object to DataConext
Below is the code I'm trying to use for my first attempt at a compiled linq query. The code builds fine and the site will run as it's expected to, however once the program calls the compiled method I ...