Coder Social home page Coder Social logo

convertingwebapitoaspnetcore's Introduction

ConvertingWebApiToAspNetCore

This is sample code for a presentation on converting a Web application from ASP.NET 4.x to ASP.Net Core. The original web app is in the OriginalWebApi/ folder. It is a simple chore tracking application. It uses static HTML and JS (e.g. it does not use MVC). It does however use WebAPI 2.X. The back-end uses an in-memory persistence and will attempt to persist .json files to the App_Data/ folder to enable persistence to be maintained between application restarts.

The application was converted to ASP.Net Core and .NET Core, 2 different ways. The first is using the WebApiCompatShim library, the result of that is in the ConvertedUsingShim/ folder. The second is converted completely to ASP.Net Core without using the shim library, the result of that is in the ConvertedFully/ folder.

Feel free to using a directory diffing tool such as KDiff3 or Beyond Compare to diff the directories to see what changes were made.

Associated Presentation

There is a presentation that walks through the conversion process, specificially detailing the steps and why changes were required.

http://itsnull.com/presentations/moveToCore/

Original Application

The OriginalWebApi/ contains the original ASP.NET 4.x application. You should be able to open and run it in VS 2013 or later.

Converted to ASP.Net Core using WebApiCompatShim

The ConvertedUsingShim/ contains the application once converted to use ASP.Net Core 1.0.0 and .NET Core. You should be able to open and run it on Windows using VS 2015 Update 3 or later.

On Windows, Linux or Mac OS X, you should be able to open it and run it using VS Code. Or on any of those platforms, once you install the dotnet runtime, you should be able to run the application by doing.

dotnet restore
dotnet run

and then navigating to http://localhost:5000/

Converted to ASP.Net Core

The ConvertedFully/ contains the application once converted to use ASP.Net Core 1.0.0 and .NET Core. You should be able to open and run it on Windows using VS 2015 Update 3 or later.

On Windows, Linux or Mac OS X, you should be able to open it and run it using VS Code. Or on any of those platforms, once you install the dotnet runtime, you should be able to run the application by doing.

dotnet restore
dotnet run

and then navigating to http://localhost:5000/

convertingwebapitoaspnetcore's People

Contributors

kstreith avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.