
Enterprise Application Development with C# 10 and .NET 6: Become a professional .NET developer by learning expert techniques for building scalable applications, 2nd Edition
- Length: 586 pages
- Edition: 2
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-06-17
- ISBN-10: 1803232978
- ISBN-13: 9781803232973
- Sales Rank: #0 (See Top 100 Books)
A comprehensive guide to every important component of C# and .NET 6 required to build robust enterprise web applications
Key Features
- Explore the advanced features of C# and .NET 6 to enhance your code and productivity
- Follow clear and easy instructions for building an end-to-end enterprise application
- Learn how to build scalable web applications and host them on the cloud
Book Description
Building production-ready enterprise applications can be a challenging task due to the overabundance of tools and their different versions that make app development complex. This book simplifies the process with an end-to-end road map for building enterprise applications from scratch using the latest features of .NET Core 6 and C# 10.
Throughout the book, you’ll work on creating an enterprise app, adding a key component to the app with each chapter, before finally getting it ready for testing and deployment. You’ll learn concepts relating to advanced data structures, the Entity Framework Core, parallel programming, and dependency injection. As you progress, you’ll cover various authentication and authorization schemes provided by .NET Core to make your apps and APIs secure. The book then shows you how the latest Microsoft Visual Studio and C# 10 help you simplify developer tasks and shares tips and tricks in Visual Studio to improve your productivity. You’ll discover various testing techniques, such as unit testing and performance testing, as well as different methods to deploy enterprise apps.
By the end of this book, you’ll be able to create enterprise apps using the powerful features of .NET 6 and deploy them to the cloud while working with various cloud components using Azure.
What you will learn
- Design enterprise apps by making the most of the latest features of .NET 6
- Discover different layers of an app, such as the data layer, API layer, and web layer
- Explore end-to-end architecture by implementing an enterprise web app using .NET and C# 10 and deploying it on Azure
- Focus on the core concepts of web application development and implement them in .NET 6
- Integrate the new .NET 6 health and performance check APIs into your app
- Explore MAUI and build an application targeting multiple platforms – Android, iOS, and Windows
Who this book is for
If you are a developer, architect, or senior programmer, this book will show you how to leverage the features of .NET 6 and the C# language, as well as help you grasp essential techniques to build your skills.
Ravindra Akella Arun Kumar Tamirisa Suneel Kumar Kunani Bhupesh Guptha Muthiyalu Enterprise Application Development with C# 10 and .NET 6 Second Edition Contributors About the authors About the reviewer Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share Your Thoughts Part 1: Fundamentals Chapter 1: Designing and Architecting the Enterprise Application A primer on common design principles and patterns Design principles Design patterns Understanding common enterprise architectures Common issues with monolithic apps Let's try to solve these common problems by adopting some proven principles/ architectures. Separation of concerns/single-responsibility architecture Stateless services architecture Event-driven architecture Resiliency architecture Identifying enterprise application requirements (business and technical) The application's business requirements The application's technical requirements Architecting an enterprise application Solution structuring of the application Summary Questions Chapter 2: Introducing .NET 6 Core and Standard Technical requirements Introducing .NET 6 Understanding the core features Understanding application frameworks Understanding the core components of .NET Setting up the development environment Understanding the CLI Overview of global.json What is .NET Standard? Understanding the use of .NET 6 and .NET Standard Understanding .NET 6 cross-platform and cloud application support Cloud support Summary Questions Further reading Chapter 3: Introducing C# 10 Technical requirements Simplification of the using directives The global using directives The implicit using directives The record structs Improvements to Lambda expressions Inferring the expression type Return types for Lambda expressions Adding attributes to Lambda expressions Enhancements to interpolated strings Extended property patterns Addition to the caller argument attributes Summary Questions Part 2: Cross-Cutting Concerns Chapter 4: Threading and Asynchronous Operations Technical requirements Understanding the jargon Demystifying threads, lazy initialization, and ThreadPool Working with System.Threading.Thread ThreadPool Lazy initialization Understanding locks, semaphores, and SemaphoreSlim The critical section and thread safety Introducing locks Mutex (Windows only) Introducing semaphores and SemaphoreSlim Choosing the right synchronization constructs Introducing tasks and parallels Introduction to Task and the TPL Handling task exceptions Implementing task cancellation Implementing continuations SynchronizationContext TaskScheduler Implementing data parallelism Using Parallel LINQ (PLINQ) Introducing async-await The task-based asynchronous pattern Principles of using async-await Async streams with IAsyncEnumerable ThreadPool starvation Using concurrent collections for parallelism ConcurrentDictionary Producer-consumer concurrent collections The BlockingCollection<T> class Summary Questions Further reading Chapter 5: Dependency Injection in .NET 6 Technical requirements What is DI? Types of DI DI in ASP.NET Core 6 Understanding service lifetimes Managing application services DI in Razor Pages Using third-party containers Summary Questions Chapter 6: Configuration in .NET 6 Technical requirements Understanding configuration Default configuration Adding configurations Reading configurations Leveraging built-in configuration providers Azure Key Vault configuration provider File configuration provider Building a custom configuration provider Configuration source Configuration provider Configuration extension Summary Questions Further reading Chapter 7: Logging in .NET 6 Technical requirements Characteristics of good logging Understanding the available logging providers Built-in logging providers Third-party logging providers Working with Azure App Service Enabling application logging in Azure App Service Monitoring using metrics Real-time telemetry in Azure Application Insights Enabling application logging in Application Insights Creating a .NET 6 logging class library Summary Questions Chapter 8: All You Need to Know about Caching Technical requirements Introduction to caching Client caching Content Delivery Network (CDN) Web server caching Database caching Application caching Understanding the components of caching Response caching Distributed caching Cache access patterns Caching platforms In-memory cache Distributed cache Designing a cache abstraction layer using distributed caching Caching considerations Summary Questions Further reading Part 3: Developing Enterprise Applications Chapter 9: Working with Data in .NET 6 Technical requirements Introduction to data Relational database management system (RDBMS) NoSQL SQL, Azure Cosmos DB, and Azure Storage SQL Server Azure Cosmos DB Azure Storage Working with EF Core Configuration and querying Code first versus database first Designing a Data Access service using Azure Cosmos DB Summary Questions Further reading Chapter 10: Creating an ASP.NET Core 6 Web API Technical requirements Introduction to REST The REST maturity model Understanding the internals of an ASP.NET Core 6 web API The Program class Understanding middleware Handling requests using controllers and actions Understanding ASP.NET Core routing Attribute-based routing The ControllerBase class, the ApiController attribute, and the ActionResult class Integration with the data layer Creating DTOs Service-class contracts The mapper class using AutoMapper HttpClient factory for service-to-service calls Implementing service classes Implementing action methods in the controller Understanding gRPC Building a gRPC server in .NET Building a gRPC client in .NET Testing gRPC services Summary Questions Further reading Chapter 11: Creating an ASP.NET Core 6 Web Application Technical requirements Introduction to frontend web development Razor syntax Exploring Razor Pages Exploring the ASP.NET Core MVC website Integrating APIs with the service layer Creating the controller and actions Creating a UI using ASP.NET Core MVC Setting up AdminLTE, the layout page, and views Understanding Blazor Summary Questions Further reading Part 4: Security Chapter 12: Understanding Authentication Technical requirements Understanding the elements of authentication in .NET 6 Introduction to ASP.NET Core Identity Sample implementation Scaffolding Integration with external login providers Understanding OAuth 2.0 Tokens Authorization grant types Introduction to Azure AD The Azure AD B2C setup Integrating our e-commerce application with Azure AD B2C Introduction to Windows Authentication Understanding best practices to secure client and server applications Summary Questions Further reading Chapter 13: Implementing Authorization in .NET 6 Technical requirements Back to a few basics Understanding authorization Simple authorization Enabling authorization globally Role-based authorization Policy-based role authorization Implementing role-based authorization Claims-based authorization Policy-based authorization Requirements Requirement handlers Registering a policy Custom authorization Custom authorization attributes Authorization in client and server applications Assigning roles to users User identity in views Summary Questions Further reading Part 5: Health Checks, Unit Testing, Deployment, and Diagnostics Chapter 14: Health and Diagnostics Technical requirements Introducing health checks The health check API in ASP.NET Core 6 Adding a health check endpoint Monitoring dependent URIs Building a custom health check Monitoring the application with Application Insights Live Metrics Usage analysis with Application Insights Smart Detection Application availability Search Logs Configuring the Snapshot Debugger Performing remote debugging Summary Questions Further reading Chapter 15: Testing Technical requirements Introducing testing Unit testing Unit testing in Visual Studio Code coverage Functional testing Automating functional test cases Load testing Load testing with JMeter Summary Questions Chapter 16: Deploying the Application in Azure Technical requirements Introducing Azure DevOps Boards Repos Pipelines Test Plans Artifacts Understanding the CI pipeline Understanding the flow and components of a pipeline Understanding the CD pipeline Continuous deployment versus CD Deploying an ASP.NET 6 application Creating a pipeline for CI and CD Summary Questions Further reading Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Enterprise Application Development with C# 10 and .NET 6: Become a professional .NET developer by learning expert techniques for building scalable applications, 2nd Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.