Posts

Showing posts from June, 2018

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

Starting our .NET Core WebAPI Journey – Step 1

As we embark on this journey of .NET Core & WebAPI, I think getting a high-level overview of what we want to accomplish is ideal to get us started.   Let’s refresh what we said in that first article and refine it a little further.   This is what we said: I don’t want to do a simple ‘Hello World’ example where we build something but it has no value.   I’d like to walk through this journey creating a real-world application with some of the layers I’d create.   So, let’s start with this: ·         Create a .NET Standard Business class library using Entity framework ·         Create a .NET Core WebAPI which uses our .NET Standard library.   We’ll set this up just as if you are doing it for real. We will use Dependency Injection, AutoMapper to convert our objects and define our settings in the appsettings.json file. Now taking this further, lets define a semi real-world experience.   If you noticed one of my first articles on LinkedIn, it was about setting up a backgroun

Starting our .NET Core WebAPI Journey

Starting our .NET Core WebAPI Journey Looking on Wikipedia, it shows that .NET Core was first released on June 27 th 2016 (my daughters b’day).   I can’t believe that .NET Core has been out for almost two years now.   You can tell Microsoft is pushing it hard these days.   Recently Microsoft released version 2.1 and they have proposed version 3.0 ( https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/ ) coming out next year which will support Windows Desktop Applications.   I suspect most companies are still using .NET framework as they have invested so much hardware on Windows devices.   Now with Docker becoming standard and being able to release your solutions in Azure, it’s becoming easier and easier to build solutions for .NET Core.   Also, I believe it was with the .NET Core 2.0 release that they started to support .NET Standard.   This allowed companies to migrate their core class libraries to.NET standard which could

Create your first Windows 10 IoT background app using Visual Studio 2017: Step by step guide

Image
Create your first Windows 10 IoT background app using Visual Studio 2017: Step by step guide Recently, I went as a Sponsor to a .NET Code Camp and one of the raffle prizes we brought was a Raspberry Pi kit.   I was amazed at how many people wanted this device and many of them said they already had them.   They are fairly inexpensive and can be found on a lot of websites.   A few have a lot of capabilities but for this example, you just need a very basic one. I had picked up a Raspberry Pi soon after you could deploy Windows 10 on it and I’ve been slowly playing with it. I thought it would be extremely helpful to show my application logging through a cheap device as well as monitor a process I was running on my server.   Today I’m basically using it as an email generator. I have a process where when my kids create a new gift they want for their B-day, then I have my background process sending an email to everyone in my family members the gift they are looking for. I