Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.
/ Dot-Net-Encasement Public archive

🐚 Encasing legacy systems using VS Code, C#, .NET Core, and Web API

License

Notifications You must be signed in to change notification settings

18F/Dot-Net-Encasement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

.NET Core / Web API Tutorial

Introduction

This repo contains sample code and instructions for creating a RESTful API using .NET Core Web API to act as a proxy for various legacy data sources (REST API, SOAP API, PostgreSQL data base, SQL Server database). It is designed for people that have some coding experience and are comfortable building APIs that are interested in learning more about C# and .NET Core.

Each step in this tutorial explains how the different pieces of the Web API application are constructed, and provides an introduction to some foundational concepts for working with C#, .NET Core and Web API.

Motivation

In 18F's work on legacy modernization projects, .NET and the Microsoft software stack are technologies we encounter often. These components are typically already used in the states and federal agencies we work with, which can make them a convenient choice for supporting legacy modernization efforts. But beyond the tactical advantage of using a platform that our partners are already invested in and familiar with, .NET Core and related components have a number of features that can make them a solid choice for this kind of work.

ASP.NET Web API is a framework that can be used to create RESTful web services, which are often important to our efforts to modernize legacy systems. There are a number of different patterns for migrating away from legacy systems that involve intercepting calls into the system and either rerouting them to new components, or modifying responses returned to the requester. ASP.NET Web APIs are a good fit for this use case.

Beyond this, building a Web API application is a good way to learn to write C# code, to become familiar with .NET Core, and to get accustomed to working with some associated tools like Visual Studio Code.

Structure

This tutorial is structured around git branches. Each step in the tutorial is contained within a distinct branch. If you are using the Github website, each step in the tutorial is linked from the README document in the previous step. To get the entire tutorial, and all of the related example code, just clone this repo.

On your local machine, to see the complete code for each section in action, you should be able to git checkout part-{number} and run either dotnet test or dotnet run.

Getting Started

Download and install:

Some other useful VS Code extensions you'll need:

You're ready to get started. Check out Part 1: Creating your first Web API application.

Further reading

These are some resources that can supplement the steps demonstrated in this tutorial and provide deeper insights into .NET Core and Web API.

General

Testing

Routing and generating responses

Data access / SQL Server

Docker

About

🐚 Encasing legacy systems using VS Code, C#, .NET Core, and Web API

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published