Skip to content

Web api migration#6

Merged
ardalis merged 6 commits into
masterfrom
WebApiMigration
Apr 8, 2015
Merged

Web api migration#6
ardalis merged 6 commits into
masterfrom
WebApiMigration

Conversation

@ardalis
Copy link
Copy Markdown
Contributor

@ardalis ardalis commented Apr 3, 2015

A simple article on migrating a Web API 2 project to ASP.NET 5. Includes new /samples/ folder in aspnet/docs root.

@danroth27
Copy link
Copy Markdown
Member

For RC we will be renaming the ASP.NET 5 Class Library and ASP.NET 5 Console Application templates to something more generic that fits their purpose. We will need to track updating the screen shots accordingly.

ASP.NET 5 Class Library will be renamed to Class Library (Package).
ASP.NET 5 Console Application will be renamed to either Console Application (Package) or Command Library (Package), it's still being debated.

@danroth27
Copy link
Copy Markdown
Member

Also, the ASP.NET dialog is getting some cleanup. The template names will just be Empty, Website and Web API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From ASP.NET Web API 2 to MVC 6

@danroth27
Copy link
Copy Markdown
Member

There are a bunch of subtle changes to attribute routing in MVC 6 that need to be addressed somewhere. @rynowak is probably the best person to detail the main differences

@danroth27
Copy link
Copy Markdown
Member

There are a number of topics related to migrating Web API 2 code that are not addressed by this article:

  • Migrating HttpConfiguration logic to the MvcOptions pattern
  • Migrating message handlers to middleware
  • Migrating formatters to the new formatter model (less common)
  • Using the Microsoft.AspNet.Mvc.WebApiCompatShim package if you are porting a lot of Web API 2 code and you want to use the Web API 2 patterns (method overloading, HTTP verb convention based on method name, HttpRequestMessage/HttpResponseMessage programming model, etc).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned previously, we recommend using attribute routing instead of trying to make things work with global routes.

It would be interesting to discuss this with you more and get your thoughts on this guidance.

ardalis added a commit that referenced this pull request Apr 8, 2015
Web api migration article, initial publication
@ardalis ardalis merged commit 49880aa into master Apr 8, 2015
@ardalis ardalis deleted the WebApiMigration branch April 8, 2015 15:28
scottaddie pushed a commit that referenced this pull request Apr 24, 2018
trobinson41 pushed a commit to trobinson41/Docs that referenced this pull request May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants