Converting to ASP.Net Core - Part 5

This is the fifth in my series of converting my red-folder.com site over to ASP.Net Core & MVC 6.

The first article looked at creating an empty project.

The second article looked at copying my existing content into place and getting it to run.

The third article look at getting it up into Azure.

The fourth article took a deeper dive into the Gulp pipeline.

In this article, I've added a simple WebApi.

Summary

This article has a been quite a while in the making - it has been almost 3 months since my last post of the series.

And if I'm honest, very little of that has been due to WebApi or ASP.Net Core. Most of the time has been taken up being distracted by Angular (and there was a cruise round the Med as well).

I've been keen to learn Angular for a while now - so I admit to having disappeared down somewhat of a rabbit hole while making a very simple App that sits over a very simple WebApi.

So the sum result of almost three months .... fairly little to be honest. I've a single Api and a single page with a very much Work-In-Progress Angular App.

The WebApi

The WebApi was pretty much dead simple.

Main differences to previous WebApi:

And that was pretty much about it. From a file perspective, take a look at:

This gives the following Api -> http://www.red-folder.com/api/Repo

Results can be seen here in this Postman screenshot (I've talked previously about Postman - a Chrome Extension which is great for Api testing):

image

The Api at this stage, along with everything else, is very basic and is intended to be a placeholder to build on later.

The App

The "app" is where I've spent most of the time - although as I've said, not a great deal to look at.

Currently that app can be seen on a secret page: http://www.red-folder.com/Home/Repo

At this stage it looks something like the below and just allows a fairly simple toggling of the Repositories shown based on tags. Again something to be built on in the future.

image

The code is a bit more interesting and can be found here. Hopefully I should be able to have time to evolve it into something meaningful - but for now it had given me a chance to get across the majority of the basics of Angular 1.x - certainly enough to pick up an existing projects and to know good practice when I see it.

What next

In the next article I will look at EF7 and pluming the WebApi into the database.

A quick note on ASP.Net Core versions. I'm still working on RC1, even though it looks like RTM is now available. I want to continue with my work on RC1 at least into the next article - which roughly completes the whole RC1 end-to-end application. Following that I will look to convert to RTM (not sure if there is an RC2 first - but I'll deal with that nearer the time.

About the author:

Mark Taylor is an experience IT Consultant passionate about helping his clients get better ROI from their Software Development.

He has over 20 years Software Development experience - over 15 of those leading teams. He has experience in a wide variety of technologies and holds certification in Microsoft Development and Scrum.

He operates through Red Folder Consultancy Ltd.