Book Image

C# 8 and .NET Core 3 Projects Using Azure - Second Edition

By : Paul Michaels, Dirk Strauss, Jas Rademeyer
Book Image

C# 8 and .NET Core 3 Projects Using Azure - Second Edition

By: Paul Michaels, Dirk Strauss, Jas Rademeyer

Overview of this book

.NET Core is a general-purpose, modular, cross-platform, and opensource implementation of .NET. The latest release of .NET Core 3 comes with improved performance and security features, along with support for desktop applications. .NET Core 3 is not only useful for new developers looking to start learning the framework, but also for legacy developers interested in migrating their apps. Updated with the latest features and enhancements, this updated second edition is a step-by-step, project-based guide. The book starts with a brief introduction to the key features of C# 8 and .NET Core 3. You'll learn to work with relational data using Entity Framework Core 3, before understanding how to use ASP.NET Core. As you progress, you’ll discover how you can use .NET Core to create cross-platform applications. Later, the book will show you how to upgrade your old WinForms apps to .NET Core 3. The concluding chapters will then help you use SignalR effectively to add real-time functionality to your applications, before demonstrating how to implement MongoDB in your apps. Finally, you'll delve into serverless computing and how to build microservices using Docker and Kubernetes. By the end of this book, you'll be proficient in developing applications using .NET Core 3.
Table of Contents (13 chapters)

Summary

In this chapter, we migrated an existing WinForms application over to .NET Core 3. This means that, even though we might have an application that is 10 or 15 years old, you can update it to use the latest framework and take advantage of the performance improvements and new features afforded by .NET Core 3.

Taking advantage of the upgrade, we then investigated one of the key features of C# 8: nullable reference types. This means that, without the use of any third-party software, we were able to expose dozens of potential bugs in our legacy code base.

We didn't stop there; we then used XAML Islands to extend our application by incorporating UWP features into WinForms. This is potentially the most exciting feature, as it essentially means that you can rewrite a legacy WinForms application from the outside in.

In the final section, we took advantage of the new packaging methods available in .NET Core 3. We used the process of tree shaking to reduce the size of our output file, and compiled our code to a single executable.

Like me, you may be seeing a pattern with these features. .NET Core has, in this release, incorporated Windows-only features, meaning you can now take a legacy WinForms app and convert it to use the latest .NET Core, thereby benefiting from all the performance improvements. You can extend it by using component creating in WPF or UWP without needing to rewrite the application. Additionally, deployment is now made easier, as we can now compile into a single executable.

In the next chapter, we'll be looking ASP.NET Core 3 and creating an MVC application that uses Cosmos DB.