Book Image

Software Architecture with C# 9 and .NET 5 - Second Edition

By : Gabriel Baptista, Francesco Abbruzzese
Book Image

Software Architecture with C# 9 and .NET 5 - Second Edition

By: Gabriel Baptista, Francesco Abbruzzese

Overview of this book

Software architecture is the practice of implementing structures and systems that streamline the software development process and improve the quality of an app. This fully revised and expanded second edition, featuring the latest features of .NET 5 and C# 9, enables you to acquire the key skills, knowledge, and best practices required to become an effective software architect. This second edition features additional explanation of the principles of Software architecture, including new chapters on Azure Service Fabric, Kubernetes, and Blazor. It also includes more discussion on security, microservices, and DevOps, including GitHub deployments for the software development cycle. You will begin by understanding how to transform user requirements into architectural needs and exploring the differences between functional and non-functional requirements. Next, you will explore how to carefully choose a cloud solution for your infrastructure, along with the factors that will help you manage your app in a cloud-based environment. Finally, you will discover software design patterns and various software approaches that will allow you to solve common problems faced during development. By the end of this book, you will be able to build and deliver highly scalable enterprise-ready apps that meet your organization’s business requirements.
Table of Contents (26 chapters)
24
Another Book You May Enjoy
25
Index

Configuring Entity Framework Core

Since database handling is confined within a dedicated application layer, it is good practice to define your Entity Framework Core (DbContext) in a separate library. Accordingly, we need to define a .NET Core class library project. As we discussed in the Book use case – understanding the main types of .NET Core projects sections of Chapter 2, Non-Functional Requirements, we have two different kinds of library projects: .NET Standard and .NET (Core).

While .NET Core libraries are tied to a specific .NET Core version, .NET Standard 2.0 libraries have a wide range of applications since they work with any .NET version greater than 2.0 and also with the classical .NET Framework 4.7.2 and above.

However, version 5 of the Microsoft.EntityFrameworkCore package, which is the version that comes with .NET 5, depends just on .NET Standard 2.1. This means that it is not designed to work with a specific .NET (Core) version but that it just...