ToDataSpurceResult is too slow

0 Answers 35 Views
Data Query Grid
Aswini
Top achievements
Rank 1
Aswini asked on 11 Oct 2023, 11:26 AM
0

Below is my code snippet.

string query = $@" select name from inventory where id = @p1;

Var data=mycontext.Database.SqlQuery(query,typeid); Var returndata =data.ToDataSourceResult(request);

Here inventory is the view which contains around 262 columns and myclass is the corresponding c# class which contains the variable for view. I m getting data from db within seconds. But this ToDataSourceResult is taking very long time. Can anyone please help me on this. I cant make any changes to this view columns

No answers yet. Maybe you can help?

Tags
Data Query Grid
Asked by
Aswini
Top achievements
Rank 1
Share this question
or