net webforms应用> c# asp.net mvc razor应用程序。

时间:2021-10-08 01:40:52

we are looking at migrating our vb.net webforms application to c# mvc. We appreciate this may need to be done in stages but was wondering if anyone else has any experience of this architectural change.

我们正在考虑将vb.net webforms应用程序迁移到c# mvc。我们很欣赏这可能需要分阶段完成,但是我想知道是否有其他人有这种架构变更的经验。

The article below appears to show a method of getting vb.mvc and vb.webforms in the same application.

下面的文章展示了获取vb的方法。mvc和vb。同一个应用程序中的webforms。

http://www.devcurry.com/2013/05/adopting-aspnet-mvc-enhancements-in.html

http://www.devcurry.com/2013/05/adopting-aspnet-mvc-enhancements-in.html

Since we are using a web application rather than a website we cannot mix languages i believe.

由于我们使用的是web应用程序而不是网站,我认为我们不能混合语言。

1 个解决方案

#1


2  

Extract the business logic out of the VB.Net project, into a separate library, and add a reference to that library to both your old VB.Net site and the new C# MVC project.

从VB中提取业务逻辑。Net项目,到一个单独的库中,并将对该库的引用添加到您的旧VB中。Net站点和新的c# MVC项目。

As long as the business logic doesn't change, you can manually convert the ASP.Net application into an MVC application, by rebuilding it on the same business logic, but with Models, Views and Controllers instead of masterpages, html builders and literals.

只要业务逻辑不变,就可以手动转换ASP。Net应用程序到MVC应用程序,通过在相同的业务逻辑上重新构建它,但是使用模型、视图和控制器而不是母版、html构建器和文本。

When you are done, you can optionally convert the VB.Net business logic to C#.

完成之后,可以选择转换VB。Net业务逻辑到c#。

#1


2  

Extract the business logic out of the VB.Net project, into a separate library, and add a reference to that library to both your old VB.Net site and the new C# MVC project.

从VB中提取业务逻辑。Net项目,到一个单独的库中,并将对该库的引用添加到您的旧VB中。Net站点和新的c# MVC项目。

As long as the business logic doesn't change, you can manually convert the ASP.Net application into an MVC application, by rebuilding it on the same business logic, but with Models, Views and Controllers instead of masterpages, html builders and literals.

只要业务逻辑不变,就可以手动转换ASP。Net应用程序到MVC应用程序,通过在相同的业务逻辑上重新构建它,但是使用模型、视图和控制器而不是母版、html构建器和文本。

When you are done, you can optionally convert the VB.Net business logic to C#.

完成之后,可以选择转换VB。Net业务逻辑到c#。