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.
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 ?)
now little bit lost performance question. better ? correct way of using ef6 ?
Comments
Post a Comment