c# - Many levels of navigation properties take too long to persist -
c# - Many levels of navigation properties take too long to persist -
i have model follows:
request hgx icollection<project> icollection<sample> icollection<typing> ....
quite complex model , hierarchy. when save incoming request, take 15 seconds.
how can speed up?
ef can generate monstruous sql statements in more complex cases. issue in case. read this post there exists datatype mismatch caused ef execute way slow.
ef expects nvarchars voor string field / columns, if varchar in database lead serious performance issues. hope can sort things out help of linked post.
also, ef (or more in general believe) "first queries" may take time initialize connection, initialize ef context , forth. should tackle couple of areas things messed up. direct repitition of same insert statement executes slsow first one?
c# entity-framework
Comments
Post a Comment