Does Fluent-NHibernate support mapping to procedures?

后端 未结 2 1857
半阙折子戏
半阙折子戏 2021-02-07 19:28

I\'ve been wondering if it\'s possible to have Fluent-NHibernate communicate with stored procedures that already exist and assign mapping from the result set to my own domain ob

2条回答
  •  长情又很酷
    2021-02-07 20:23

    The trunk version of Fluent NHibernate (on GitHub) supports insert, update and delete stored procedures.

    In your mapping class constructor, call:

    SqlInsert("StoredProcName");
    

    Disclaimer: I haven't tested this myself yet, but it certainly will come in handy soon.

    For more info see this thread in the Fluent NHibernate Google Group.

提交回复
热议问题