Linq to SQL: Is it better to have a small DataContext for each page or a global one?

前端 未结 4 498
情深已故
情深已故 2021-01-12 03:08

I am trying out Linq to SQL in an ASP.NET application that uses a large database with lots of foreign keys (100+ tables). I am impressed with how Linq permits you to create

4条回答
  •  一向
    一向 (楼主)
    2021-01-12 03:20

    This page http://www.albahari.com/nutshell/10linqmyths.aspx (see Myth #10) says it's better to use short-lived DataContext instances.

提交回复
热议问题