Posts

Showing posts from 2018

Starting our .NET Core WebAPI Journey – Step 3

Image
Learning is a process and I needed to learn that these guides should be smaller.   That was clearly evident to me in our last guide.   I’m going to attempt to make this guide smaller.   While in step 2, we wrote all of the class library, in this guide, I’m only going to focus on the Log WebAPI Controller.   We’ll add the email queue controller in a future guide. In this guide, we will ·          Create our WebAPI Project ·          Code the Log WebAPI Controller ·          Configure the Service ·          Test the Service through PostMan Creating the WebAPI Project Open up the solution that you initially created the class library.   In my example below, I have my LunchandLearn solution opened.   Click on Add--> New Project .   Select the .NET Core template area and select to create a ASP.NET Core Web Application . Below I’m naming this SampleAspNetCore.     Click OK and you then have a few different .NET Core project templates to choose from.   Make sure yo

Starting our .NET Core WebAPI Journey – Step 2

Image
If you read my ASP.NET Core WebAPI Journey - Step 1, we touched on the fact, we wanted to build our class library first as this will really do most if not all of the business logic. We’re going to create this in a .NET Standard library so we can start using this same library in both .NET Core or .NET framework class libraries in this and future guides going forward. Our business class library will start off doing three things.   ·         Log generic topics into the database ·         Log emails to be sent ·         Send emails Before the creation of the library itself, we need to model our database to store these values. This will be used for logging and our automated email queue. Below is a high-level overview of all of the steps to create this library. You can follow along but all of the code is available to download at   https://github.com/RichardWysocki/LunchandLearn . Creating our Database In this guide, we are going to use SQL Server. Why?   As a Microsof