I read in some places that it would be good to use a singleton context, but what if it was in a service? It will keep running all the time, making from time to time requests to a REST API, so I'm thinking, it will have an instance of the DbContext
allocated on the memory.
What would be better, the using (var context = new DbContext())
or a singleton DbContext
?