Subsonic - can anyone provide an example of using Subsonic SimpleRepository to persist a list/array of objects?

前端 未结 2 1636
深忆病人
深忆病人 2021-01-17 04:13

I\'m looking for possible ways to persist the following classes. Subsonic SimpleRepository looks like it might work, and people have said it should, when I

2条回答
  •  清酒与你
    2021-01-17 05:05

    To answer my own question...

    Despite some other postings I found which imply that Subsonic SimpleRepository can automatically generate a relational schema from an object model, this turns out NOT to be the case. See Rob Conery's answer to this question:

    relationships-and-lazy-loading-in-subsonic-3-0

    He's working on it, however, and it will probably be well worth the wait.

    In the meantime, I've looked at Fluent NHibernate, and this does what I want right out of the box. Their source code download has a demo project called Examples.FirstProject which demonstrates the functionality I'm looking for. Their documentation seems to be much more mature as well.

    However, NHibernate also appears more complex overall, so it will be interesting to see what develops with Subsonic.

    Edit: Heres a useful link that shows how to mangage foreign keys yourself in SimpleRepository -

    subsonic-3-simplerepository

    Have not tried it myself, but looks like it would actually work.

提交回复
热议问题