Difference between Get and Load

前端 未结 4 836
失恋的感觉
失恋的感觉 2021-02-01 02:11

What\'s the difference between Get(object id) and Load(object id)? The documentation pretty much reads the same. Also, if it matter

4条回答
  •  醉梦人生
    2021-02-01 03:04

    http://ayende.com/Blog/archive/2009/04/30/nhibernate-ndash-the-difference-between-get-load-and-querying-by.aspx

    Get will return null if the object requested doesn't exist. Load will throw an exception if the object requested doesn't exist. Otherwise, they function exactly the same as far as I can tell.

提交回复
热议问题