Book Image

C# 7 and .NET: Designing Modern Cross-platform Applications

By : Mark J. Price, Ovais Mehboob Ahmed Khan
Book Image

C# 7 and .NET: Designing Modern Cross-platform Applications

By: Mark J. Price, Ovais Mehboob Ahmed Khan

Overview of this book

C# is a widely used programming language, thanks to its easy learning curve, versatility, and support for modern paradigms. The language is used to create desktop apps, background services, web apps, and mobile apps. .NET Core is open source and compatible with Mac OS and Linux. There is no limit to what you can achieve with C# and .NET Core. This Learning Path begins with the basics of C# and object-oriented programming (OOP) and explores features of C#, such as tuples, pattern matching, and out variables. You will understand.NET Standard 2.0 class libraries and ASP.NET Core 2.0, and create professional websites, services, and applications. You will become familiar with mobile app development using Xamarin.Forms and learn to develop high-performing applications by writing optimized code with various profiling techniques. By the end of C# 7 and .NET: Designing Modern Cross-platform Applications, you will have all the knowledge required to build modern, cross-platform apps using C# and .NET. This Learning Path includes content from the following Packt products: • C# 7.1 and .NET Core 2.0 - Modern Cross-Platform Development - Third Edition by Mark J. Price • C# 7 and .NET Core 2.0 High Performance by Ovais Mehboob Ahmed Khan
Table of Contents (25 chapters)
Title Page
Copyright
About Packt
Contributors
Preface
16
Designing Guidelines for .NET Core Application Performance
Index

Developing microservices architecture with .NET Core


So far, we have learned the fundamentals of microservices and the importance of DDD. In this section, we will develop a microservices architecture for a sample application that contains the following features:

  • Identity service
  • Vendor service

Creating a sample app in .NET Core using microservices architecture

In this section, we will create a sample app in .NET Core and define services that include the authorization server, a vendor service, and an order service. To start with, we can use either Visual Studio 2017 or Visual Studio Code and create projects using dotnet Command-Line Interface (CLI) tools. The advantage of choosing Visual Studio 2017 is that it provides an option while creating the project to enable Docker support, add the Docker-related files, and make Docker the startup project:

Solution structure

The structure of the solution will look like the following:

In the preceding structure, we have root folders, namely Core, Microservices...