c# - Entity Framework DBContext.Entry() is very slow -
i trying data out of database. using .entry slow, on 65% of time spent right there. have ideas how optimize query? want data read only.
sorry adding code image, not let me post question when formatted using code sample button.
your query definitively far being optimized. try instead:
seismic2dsurvey.endsandbends = winpicsdbcontext.locations .where(t => t.surveyid = seismic2dsurvey.id && (t.isbend || (t.isend.hasvalue && t.isend.value))).orderby(t => t.tracenumber).tolist(); seismic2dsurvey.tracecount = locations.count(); seismic2dsurvey.surveylocations = null;
Comments
Post a Comment