c# - Connection Open / Close with Dependency Injection -


we're working on asp.net core application using dependency injection , entity framework 6, , discussing team database performance. use prefix monitoring our application, , detect ef6 opens , close connection each time made request. fine regarding entity framework principle, if send lots of request (30 requests), select requests, opens / closes connection @ each request.

enter image description here

as can see, open / close operation takes each request 43ms, , can annoying. code made request uses single instance of dbcontext http request.

we tried create, of ourself, unique connection each request, open , close @ end of http request. have unique open , unique close each http request, detect bad performance .net code time, unknown source (maybe ef6 ?)

enter image description here

now little bit lost performance question. better ? correct way of using ef6 ?


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -