MVC中的数据访问层 [英] Data Access Layer in MVC

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

问题描述

大家好,
我是MVC架构的新手.我已经在N层架构中开发了代码,因为在N层架构中有数据访问层,如何将这段代码放置在MVC架构中?是否建议添加另一个类库项目来执行数据访问或通过控制器进行数据访问?

我有一个要添加到我的项目中的Web服务.该服务将获取要在UI上显示的数据,并将数据从UI上的输入表单提交给该服务.

Hi All,
I''m new to MVC architecture. I have developed code in N-tier Architeture, as in N-tier architecture there is data access layer , how to place this chunk of code in MVC architecture ? Is it advisable to have another Class Library Project added to perform Data Access or the Data Access to be done via controller ?

I have a web service to be added to my project. This service will fetch the data to be displayed on UI and submit the data from the input form on UI to the service.

推荐答案



请参阅以下链接.

架构指南:ASP.NET MVC框架+ N层+实体框架等等 [ ^ ]
使用ASP.NET MVC进行N层开发, WCF和LINQ [ ^ ]
Hi,

refer the below links.

Architecture Guide: ASP.NET MVC Framework + N-tier + Entity Framework and Many More[^]
N-Tier development with ASP.NET MVC, WCF, and LINQ[^]


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

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