凡建立在MVC项目数据访问层 [英] Where to create a Data Access Layer in the MVC Project

查看:156
本文介绍了凡建立在MVC项目数据访问层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个空MVC项目,因为我需要访问数据库,我没有使用任何实体的框架,只是直接使用codeS。在这里,我重视我的项目架构的快照u可以看到数据访问层的文件夹,它是用数据访问层在同一项目的好方法还是我们需要创建数据访问层一个单独的项目。

I have created an empty MVC project, in that I need to access database i am not using any entity framework ,just directly using codes. Here I have attached the snapshot of my project architecture in that u can see Data Access Layer folder, is it a good way to use the Data Access Layer in the same project or do we need to create a separate project for data access layer.

项目建筑快照:

推荐答案

我也面临着类似的probelm.see以下是为您的帮助。
http://www.$c$cproject.com/Articles/70061/Architecture-Guide-ASP-NET-MVC-Framework-N-tier-En

I am also face similar probelm.see following is help for you. http://www.codeproject.com/Articles/70061/Architecture-Guide-ASP-NET-MVC-Framework-N-tier-En

我用work.But的存储库模式和单位有你的冗余通过layers.the上面的链接编码包含位老看到的是对您有所帮助。不要忘了在this.thank你commet。

I use repository pattern and unit of work.But there you are redundancy coding via layers.the above link contain bit old one see is that help to you. don't forget to make a commet on this.thank you.

这篇关于凡建立在MVC项目数据访问层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆