Should I create a DataContext object each time a User accesses a site to take some information from the database? Or should it be globally created?

1 answer 1

The globally created DataContext doesn't exactly need to be used, this class is not thread safe. You can create an instance with each call, you can store it in session variables. In the session version there will be difficulties in managing the lifetime of the context.