从ASP.NET 3.5到ASP.NET MVC Framework2的转换 [英] Conversion from ASP.NET 3.5 to ASP.NET MVC Framework2

查看:78
本文介绍了从ASP.NET 3.5到ASP.NET MVC Framework2的转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在ASP.NET 3.5中有一个Web应用程序
我需要将该应用程序转换/重新架构/重新设计为ASP.NET MVC framework2 Web应用程序.

我已经下载了该框架,并且该框架可以在我的系统上正常工作.
现有项目包括以下部分.
1)具有表和存储的proc的数据库(在sql server 2005中).
2)aspx页面及其后面的代码
3)WCF服务包含所有业务逻辑类.
新的ASP.NET MVC 2框架具有​​三个文件夹,例如模型视图和控制器.

请帮我决定在哪个文件夹中应该放什么?
据我所知,数据库部分应该在模型中.但是我所有的业务逻辑类都在单独的wcf服务中.我需要在控制器中创建该服务吗?我还能在其中包含代码背后的代码吗?

请帮我.我很困惑.

在此先感谢

Hi,

I am having a web application in ASP.NET 3.5
I need to convert/re-architecture/redesign that application to the ASP.NET MVC framework2 web application.

I have downloaded the framework and it''s working on my system.
The existing project has the following parts.
1) database (in sql server 2005) with tables and stored procs.
2) aspx pages and its code behind
3) WCF service contains all the business logic classes.
The new ASP.NET MVC 2 framework has three folders like model view and controller.

Pls help me to decide what should come in which folder?
As per my knowledge, the DB part should come in model. But all my business logic classes are in a separate wcf service. Do i need to create that service in controller? Also where i can include the code behind code?

Pls help me.I am totally confused.

Thanks in advance

推荐答案

您在Controller中编写代码,并且视图包含设计(aspx页面).
您不能在MVC中包含服务.
You write your code in Controller and your view contains the design(aspx pages).
You can not include service in MVC.


reth写道:

现在我需要转换/重新架构/将该应用程序重新设计为asp.net mvc framework2 Web应用程序.

Now i need to convert / re architecture / redesign that application to the asp.net mvc framework2 web application.



为什么?



Why ?


这篇关于从ASP.NET 3.5到ASP.NET MVC Framework2的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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