Using a Generic Repository pattern with fluent nHibernate

前端 未结 2 1308
孤街浪徒
孤街浪徒 2021-01-31 06:21

I\'m currently developing a medium sized application, which will access 2 or more SQL databases, on different sites etc...

I am considering using something similar to th

2条回答
  •  猫巷女王i
    2021-01-31 06:47

    Here are my thoughts on generic repositories:

    Advantage of creating a generic repository vs. specific repository for each object?

    I have successfully used that pattern with NHibernate, and haven't found any real shortcomings.

    The gist is that truly generic repositories are a bit of a red herring, but the same benefits can be realized by thinking about the problem slightly differently.

    Hope that helps.

提交回复
热议问题