Why does no one disposes DbContext after WebApi controller operation?

后端 未结 6 2508
梦谈多话
梦谈多话 2021-02-19 20:32

I am aware of various tutorials as well as complete examples targeting WebApi & Entity Framework (even from Microsoft) that have WebApi

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 20:50

    It's because they're wrong. Don't trust other people's code, especially when it's part of an online tutorial.

提交回复
热议问题