Enterprise Application Development with C# 10 and .NET 6 - Second Edition

Enterprise Application Development with C# 10 and .NET 6 - Second Edition

Read it now on the O’Reilly learning platform with a 10-day free trial.

O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.

Book description

A comprehensive guide to every important component of C# and .NET 6 required to build robust enterprise web applications

Key Features

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

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.

Show and hide more Table of contents Product information

Table of contents

  1. Ravindra Akella
  2. Arun Kumar Tamirisa
  3. Suneel Kumar Kunani
  4. Bhupesh Guptha Muthiyalu
  5. Enterprise Application Development with C# 10 and .NET 6 Second Edition
  6. Contributors
  7. About the authors
  8. About the reviewer
  9. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Share Your Thoughts
    1. A primer on common design principles and patterns
      1. Design principles
      2. Design patterns
      1. Common issues with monolithic apps
      2. Let's try to solve these common problems by adopting some proven principles/ architectures.
      3. Separation of concerns/single-responsibility architecture
      4. Stateless services architecture
      5. Event-driven architecture
      6. Resiliency architecture
      1. The application's business requirements
      2. The application's technical requirements
      1. Technical requirements
      2. Introducing .NET 6
        1. Understanding the core features
        2. Understanding application frameworks
        1. Overview of global.json
        1. Understanding the use of .NET 6 and .NET Standard
        1. Cloud support
        1. Technical requirements
        2. Simplification of the using directives
          1. The global using directives
          2. The implicit using directives
          1. Inferring the expression type
          2. Return types for Lambda expressions
          3. Adding attributes to Lambda expressions
          1. Technical requirements
          2. Understanding the jargon
          3. Demystifying threads, lazy initialization, and ThreadPool
            1. Working with System.Threading.Thread
            2. ThreadPool
            3. Lazy initialization
            1. The critical section and thread safety
            2. Introducing locks
            3. Mutex (Windows only)
            4. Introducing semaphores and SemaphoreSlim
            5. Choosing the right synchronization constructs
            1. Introduction to Task and the TPL
            2. Handling task exceptions
            3. Implementing task cancellation
            4. Implementing continuations
            5. SynchronizationContext
            6. TaskScheduler
            7. Implementing data parallelism
            8. Using Parallel LINQ (PLINQ)
            1. The task-based asynchronous pattern
            2. Principles of using async-await
            3. Async streams with IAsyncEnumerable
            4. ThreadPool starvation
            1. ConcurrentDictionary
            2. Producer-consumer concurrent collections
            3. The BlockingCollection class
            1. Technical requirements
            2. What is DI?
              1. Types of DI
              1. Understanding service lifetimes
              2. Managing application services
              3. DI in Razor Pages
              1. Technical requirements
              2. Understanding configuration
                1. Default configuration
                2. Adding configurations
                3. Reading configurations
                1. Azure Key Vault configuration provider
                2. File configuration provider
                1. Configuration source
                2. Configuration provider
                3. Configuration extension
                1. Technical requirements
                2. Characteristics of good logging
                3. Understanding the available logging providers
                  1. Built-in logging providers
                  2. Third-party logging providers
                  1. Enabling application logging in Azure App Service
                  2. Monitoring using metrics
                  1. Enabling application logging in Application Insights
                  1. Technical requirements
                  2. Introduction to caching
                    1. Client caching
                    2. Content Delivery Network (CDN)
                    3. Web server caching
                    4. Database caching
                    5. Application caching
                    1. Response caching
                    2. Distributed caching
                    3. Cache access patterns
                    1. In-memory cache
                    2. Distributed cache
                    1. Caching considerations
                    1. Technical requirements
                    2. Introduction to data
                      1. Relational database management system (RDBMS)
                      2. NoSQL
                      1. SQL Server
                      2. Azure Cosmos DB
                      3. Azure Storage
                      1. Configuration and querying
                      2. Code first versus database first
                      1. Technical requirements
                      2. Introduction to REST
                        1. The REST maturity model
                        1. The Program class
                        2. Understanding middleware
                        1. Understanding ASP.NET Core routing
                        2. Attribute-based routing
                        3. The ControllerBase class, the ApiController attribute, and the ActionResult class
                        1. Creating DTOs
                        2. Service-class contracts
                        3. The mapper class using AutoMapper
                        4. HttpClient factory for service-to-service calls
                        5. Implementing service classes
                        6. Implementing action methods in the controller
                        1. Building a gRPC server in .NET
                        2. Building a gRPC client in .NET
                        3. Testing gRPC services
                        1. Technical requirements
                        2. Introduction to frontend web development
                          1. Razor syntax
                          2. Exploring Razor Pages
                          3. Exploring the ASP.NET Core MVC website
                          1. Setting up AdminLTE, the layout page, and views
                          1. Technical requirements
                          2. Understanding the elements of authentication in .NET 6
                          3. Introduction to ASP.NET Core Identity
                            1. Sample implementation
                            2. Scaffolding
                            3. Integration with external login providers
                            1. Tokens
                            2. Authorization grant types
                            1. The Azure AD B2C setup
                            2. Integrating our e-commerce application with Azure AD B2C
                            1. Technical requirements
                            2. Back to a few basics
                            3. Understanding authorization
                              1. Simple authorization
                              2. Enabling authorization globally
                              1. Policy-based role authorization
                              2. Implementing role-based authorization
                              1. Requirements
                              2. Requirement handlers
                              3. Registering a policy
                              1. Custom authorization attributes
                              1. Assigning roles to users
                              2. User identity in views
                              1. Technical requirements
                              2. Introducing health checks
                              3. The health check API in ASP.NET Core 6
                                1. Adding a health check endpoint
                                2. Monitoring dependent URIs
                                3. Building a custom health check
                                1. Live Metrics
                                2. Usage analysis with Application Insights
                                3. Smart Detection
                                4. Application availability
                                5. Search
                                6. Logs
                                1. Technical requirements
                                2. Introducing testing
                                3. Unit testing
                                  1. Unit testing in Visual Studio
                                  2. Code coverage
                                  1. Automating functional test cases
                                  1. Load testing with JMeter
                                  1. Technical requirements
                                  2. Introducing Azure DevOps
                                    1. Boards
                                    2. Repos
                                    3. Pipelines
                                    4. Test Plans
                                    5. Artifacts
                                    1. Understanding the flow and components of a pipeline
                                    1. Continuous deployment versus CD
                                    1. Creating a pipeline for CI and CD
                                    1. Packt is searching for authors like you
                                    2. Share Your Thoughts
                                    Show and hide more

                                    Product information

                                    • Title: Enterprise Application Development with C# 10 and .NET 6 - Second Edition
                                    • Author(s): Ravindra Akella, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu
                                    • Release date: June 2022
                                    • Publisher(s): Packt Publishing
                                    • ISBN: 9781803232973

                                    You might also like

                                    Check it out now on O’Reilly

                                    Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.