最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

migration - To migrate an ASP.Net app to .Net Core, is MVC required? - Stack Overflow

programmeradmin3浏览0评论

Does an asp app have to use MVC in order to be migrated to .Net Core?

The app is simple: 3 screens and some calls to stored procs to get and update data.

I do not want to use the Visual Studio migration assistant because it may make this more complicated and inhibit my ability to understand how to properly migrate.

Does an asp app have to use MVC in order to be migrated to .Net Core?

The app is simple: 3 screens and some calls to stored procs to get and update data.

I do not want to use the Visual Studio migration assistant because it may make this more complicated and inhibit my ability to understand how to properly migrate.

Share Improve this question asked Feb 16 at 21:57 AdrevAdrev 11 bronze badge New contributor Adrev is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

2 Answers 2

Reset to default 0

If you migrate using the upgrade assistant then your project must be one of the supported types https://learn.microsoft/en-us/dotnet/core/porting/upgrade-assistant-overview

If you manually migrate by starting a new .NET project then you can use the architecture that you like. You can use MVC but Razor pages is simpler and is recommended in the Microsoft documentation.

Does an asp app have to use MVC in order to be migrated to .Net Core?

It depends if you want to keep the front end in ASP.NET Core. You have the main upgrade choices: Web APIs or MVCs apps, both are very similar the key difference is that Web APIs dont have a View, they have Controllers that return Models and the FrontEnd consumes the API or a GraphGL server does and the FrontEnd uses that.

The app is simple: 3 screens and some calls to stored procs to get and update data.

Simply put the .Net 4's simplest controller into ChatGPT and tell it to convert to .Net 9.0 and tell it to convert the project file too. You might take this opportunity to look into MVC Views, Razor or React to do the frontend. Create a new ASP.NET Core Solution add the converted code and get it working. Then see if you can manually convert the other 2 projects without ChatGPT. Also this is a good time to look at switching to a better/cheaper dB like Postgres!

发布评论

评论列表(0)

  1. 暂无评论