R
R
Roman2016-04-14 17:18:53
ASP.NET
Roman, 2016-04-14 17:18:53

How does DbContext work in ASP.NET MVC 5, Web api 2?

Good afternoon!
I understand at the moment in asp.net mvc using ef6 when working. The question arose of how ef6 works with dbcontext, does it create it every time a user request arrives, or is the context created once at the first call and weighs in the server's memory?
Please tell me, thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2016-04-14
@yarosroman

Each time a new one is created. (New database connection, new transaction)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question