Last post Feb 12, 2018 12:29 PM by PatriceSc
Feb 10, 2018 12:29 AM|tvb2727|LINK
Is it possible to write a linq statement, store it in the database and then have Entity Framework read that in and process it via Entity Framework?
We are currently running normal sql statements in the database, but it is VERY slow on large queries.
Feb 10, 2018 10:44 AM|DA924|LINK
No, Linq is part of the .NET Framework used by C# or VB.NET that would be used in the hosting or hosted assembly such as an exe or a DLL.
Linq and EF would be even slower. I doubt that the T-SQL query is slow. What I suspect is slow is the dataset and datatable being used to hold the results of the T-SQL query.
Feb 12, 2018 10:49 AM|Eric Du|LINK
According to your description, i think you want to use linq statement to operate database instead SQL statement, so you could check the following sample tutorials:
Saving Data in the Connected Scenario:
Entity Framework CRUD: Select Insert Edit Update Delete using Entity Framework in ASP.Net:
Feb 12, 2018 12:29 PM|PatriceSc|LINK
EF ends up in running SQL as well as it's unlikely a way to solve your issue. You should understand first what happens. Maybe you are missing indexes or just try to load too much data ?