Skip to content
Advertisement

Tag: entity-framework

Performance for using 2 where clauses in LINQ

In LINQ-to-Entities you can query entities by doing: I know that behind the scenes it will be translated to SQL to something similar to: However is there a difference (with respect to performance) if I write: Will it be translated to the same SQL query? From my understanding .Where() will return IEnumerable<T> so the second .Where() will filter the entities

Stored procedure returns int instead of result set

I have a stored procedure that contains dynamic select. Something like this: In SSMS the stored procedure runs fine and shows result set. In C# using Entity Framework it shows returning an int instead of IEnumerable? Generated function for usp_GetTestRecords Answer Entity Framework can’t tell what your stored procedure is returning. I’ve had success creating a table variable that mirrors

Fastest Way of Inserting in Entity Framework

I’m looking for the fastest way of inserting into Entity Framework. I’m asking this because of the scenario where you have an active TransactionScope and the insertion is huge (4000+). It can potentially last more than 10 minutes (default timeout of transactions), and this will lead to an incomplete transaction. Answer To your remark in the comments to your question:

Advertisement