What's the best way to refresh entities in nhibernate

前端 未结 2 650
北荒
北荒 2020-12-20 11:10

I would like to refresh an entity and all its child collections. What is the best way to do this? I\'m talking about nhibernate:)

I\'ve read about session.Evict, ses

2条回答
  •  眼角桃花
    2020-12-20 12:12

    Refresh after Evict probably won't work.

    Theoretically, Refresh alone should be enough. However, it has known issues when elements of child collections have been deleted.

    Evict followed by Get usually gets things done.

提交回复
热议问题