简体   繁体   English

使用ninject实现存储库模式

[英]Repository pattern implementation with ninject

In my project, I trying to implement repository pattern and unit of work. 在我的项目中,我尝试实现存储库模式和工作单元。 I found some web site to describe how to implement it such as: 我找到了一些网站来描述如何实现它,例如:

http://www.codeproject.com/Articles/688929/Repository-Pattern-and-Unit-of http://www.codeproject.com/Articles/688929/Repository-Pattern-and-Unit-of

http://www.codeproject.com/Articles/561584/Repository-Pattern-with-Entity-Framework-using http://www.codeproject.com/Articles/561584/Repository-Pattern-with-Entity-Framework-using

I was wondering, why is not generic Unit of Work and Repositories Framework? 我想知道,为什么没有通用的工作单元和存储库框架? then try several search on internet and I found it, 然后尝试在互联网上进行几次搜索,结果发现了,

http://genericunitofworkandrepositories.codeplex.com/ http://genericunitofworkandrepositories.codeplex.com/

This framework is first code but my project is model first therefore is not work correctly? 这个框架是第一个代码,但是我的项目是第一个模型,因此无法正常工作?

Could you please suggest me model first framework like this? 您能否建议我为第一个这样的框架建模?

My project is a internet web site with one database, If there is plausible reason I can change model first approach to code first approach. 我的项目是一个有一个数据库的Internet网站,如果有合理的理由,我可以将模型优先方法更改为代码优先方法。

Thanks for you time. 谢谢您的时间。

We've abstracted all the interfaces in our latest release into Repository.Pattern project https://genericunitofworkandrepositories.codeplex.com/SourceControl/latest#main/Source/Repository.Pattern , in plans to implement nHibernate provider. 我们已将最新版本中的所有接口抽象到Repository.Pattern项目https://genericunitofworkandrepositories.codeplex.com/SourceControl/latest#main/Source/Repository.Pattern中 ,以实现nHibernate提供程序。 You are more than welcome to start implementing these interfaces, based on bandwidth at the moment, I cannot commit to any dates as of yet. 非常欢迎您开始实现这些接口,基于当前的带宽,到目前为止我还不能承诺任何日期。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM