Entity framework context as static

后端 未结 3 952
小蘑菇
小蘑菇 2020-11-29 06:09

In a web application it would be ok if i declare the context of a entity framework model as static? it would be ok? its not recommended? why? Thanks!

3条回答
  •  眼角桃花
    2020-11-29 07:07

    This answer sort of answers your question, so does this one. I certainly wouldn't consider having it as static!

    Rick Strahl has an in depth article on the lifecycle management.

提交回复
热议问题