دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش: [9 ed.]
نویسندگان: Adam Freeman
سری:
ISBN (شابک) : 1484279565, 9781484279564
ناشر: Apress
سال نشر: 2022
تعداد صفحات: 1286
[1267]
زبان: English
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 41 Mb
در صورت تبدیل فایل کتاب Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications Using MVC, Blazor, and Razor Pages به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب Pro ASP.NET Core 6: با استفاده از صفحات MVC، Blazor و Razor، برنامه های وب آماده Cloud-Ready را توسعه دهید نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
توسعهدهندگان حرفهای با استفاده از راهنمای این کتاب پرفروش، برنامههای کاربردی کمتری را برای پلتفرم ASP.NET Core تولید خواهند کرد، که اکنون در نسخه نهم آن قرار دارد و برای ASP.NET Core برای .NET 6 بهروزرسانی شده است. حاوی توضیحات مفصلی است. از پلتفرم ASP.NET Core و فریم ورک های کاربردی که پشتیبانی می کند. این راهنمای سنگ بنای ASP.NET Core برای دات نت 6 را در زمینه قرار می دهد و به ابزارها و تکنیک های مورد نیاز برای ساخت برنامه های کاربردی وب مدرن و قابل توسعه می پردازد. ویژگیها و قابلیتهای جدیدی مانند MVC، Razor Pages، Blazor Server، و Blazor WebAssembly همراه با نمایش نحوه استفاده از آنها پوشش داده شده است.
ASP.NET Core for .NET 6 آخرین تکامل مایکروسافت است. پلت فرم وب ASP.NET و یک چارچوب \"میزبان ناشناس\" و یک مدل برنامه نویسی با بهره وری بالا را ارائه می دهد که معماری کد تمیزتر، توسعه آزمایش محور و توسعه پذیری قدرتمند را ترویج می کند.
نویسنده آدام فریمن به طور کامل این کار را انجام داده است. این کتاب پیشرو در بازار را اصلاح کرد و توضیح میدهد که چگونه میتوان از ASP.NET Core برای دات نت 6 بیشترین بهره را برد. او با مباحث مربوط به پیچ و مهره شروع میکند، به شما در مورد اجزای میانافزار، خدمات داخلی، اتصال مدل درخواست، و بیشتر. با کسب دانش و اعتماد به نفس، او موضوعات پیچیده تر و ویژگی های پیشرفته تر، از جمله مسیریابی نقطه پایانی و تزریق وابستگی را معرفی می کند. او عمیقاً تلاش می کند تا دانش لازم را به شما بدهد.
این کتاب از همان قالب و سبک نسخه های محبوب قبلی پیروی می کند، اما همه چیز را برای نسخه جدید ASP.NET Core برای نسخه NET 6 به روز می کند. و تمرکز را گسترش می دهد تا تمام پلت فرم ASP.NET Core را در بر گیرد. از مطالعه موردی کاملاً کارآمد یک برنامه ASP.NET Core که میتوانید به عنوان الگوی پروژههای خود استفاده کنید، قدردانی خواهید کرد.
کد منبع این کتاب را میتوانید در https://github پیدا کنید. com/Apress/pro-asp.net-core-6.
آنچه یاد خواهید گرفت
</ p>
این کتاب برای چه کسی است
برنامهنویسان وب با دانش اولیه توسعه وب و C# که میخواهند آخرین پیشرفتها و عملکردها را در ASP.NET Core برای NET 6 را وارد پروژه های خود کنید.
Professional developers will produce leaner applications for the ASP.NET Core platform using the guidance in this best-selling book, now in its 9th edition and updated for ASP.NET Core for .NET 6. It contains detailed explanations of the ASP.NET Core platform and the application frameworks it supports. This cornerstone guide puts ASP.NET Core for .NET 6 into context and dives deep into the tools and techniques required to build modern, extensible web applications. New features and capabilities such as MVC, Razor Pages, Blazor Server, and Blazor WebAssembly are covered, along with demonstrations of how they are applied.
ASP.NET Core for .NET 6 is the latest evolution of Microsoft’s ASP.NET web platform and provides a "host-agnostic" framework and a high-productivity programming model that promotes cleaner code architecture, test-driven development, and powerful extensibility.
Author Adam Freeman has thoroughly revised this market-leading book and explains how to get the most from ASP.NET Core for .NET 6. He starts with the nuts-and-bolts topics, teaching you about middleware components, built-in services, request model binding, and more. As you gain knowledge and confidence, he introduces increasingly more complex topics and advanced features, including endpoint routing and dependency injection. He goes in depth to give you the knowledge you need.
This book follows the same format and style as the popular previous editions but brings everything up to date for the new ASP.NET Core for .NET 6 release and broadens the focus to include all of the ASP.NET Core platform. You will appreciate the fully worked case study of a functioning ASP.NET Core application that you can use as a template for your own projects.
Source code for this book can be found at https://github.com/Apress/pro-asp.net-core-6.
What You Will Learn
Who This Book Is For
Web developers with a basic knowledge of web development and C# who want to incorporate the latest improvements and functionality in ASP.NET Core for .NET 6 into their own projects.
Table of Contents About the Author About the Technical Reviewer Part I Chapter 1: Putting ASP.NET Core in Context Understanding the Application Frameworks Understanding the MVC Framework Understanding Razor Pages Understanding Blazor Understanding the Utility Frameworks Understanding the ASP.NET Core Platform Understanding This Book What Software Do I Need to Follow the Examples? What Platform Do I Need to Follow the Examples? What If I Have Problems Following the Examples? What If I Find an Error in the Book? What Does This Book Cover? Part 1: Introducing ASP.NET Core Part 2: The ASP.NET Core Platform Part 3: ASP.NET Core Applications Part 4: Advanced ASP.NET Core Features What Doesn’t This Book Cover? How Do I Contact the Author? What If I Really Enjoyed This Book? What If This Book Has Made Me Angry and I Want to Complain? Summary Chapter 2: Getting Started Choosing a Code Editor Installing Visual Studio Installing the .NET SDK Installing Visual Studio Code Installing the .NET SDK Installing SQL Server LocalDB Creating an ASP.NET Core Project Opening the Project Using Visual Studio Opening the Project with Visual Studio Code Running the ASP.NET Core Application Understanding Endpoints Understanding Routes Understanding HTML Rendering Creating and Rendering a View Adding Dynamic Output Putting the Pieces Together Summary Chapter 3: Your First ASP.NET Core Application Setting the Scene Creating the Project Preparing the Project Adding a Data Model Creating a Second Action and View Linking Action Methods Building the Form Receiving Form Data Understanding Model Binding Storing Responses Adding the Thanks View Displaying the Responses Adding Validation Highlighting Invalid Fields Styling the Content Styling the Welcome View Styling the Form View Styling the Thanks View Styling the List View Summary Chapter 4: Using the Development Tools Creating ASP.NET Core Projects Creating a Project Using the Command Line Opening the Project Adding Code and Content to Projects Understanding Item Scaffolding Building and Running Projects Using the Hot Reload Feature Building and Running Projects Using Visual Studio Code Building and Running Projects Using Visual Studio Managing Packages Managing NuGet Packages Managing Tool Packages Managing Client-Side Packages Debugging Projects Summary Chapter 5: Essential C# Features Preparing for This Chapter Opening the Project Enabling the MVC Framework Creating the Application Components Creating the Data Model Creating the Controller and View Selecting the HTTP Port Running the Example Application Understanding Top-Level Statements Understanding Global using Statements Understanding Implicit using Statements Understanding Null State Analysis Ensuring Fields and Properties Are Assigned Values Using Nullable Types Checking for Null Values Using the Null Conditional Operator Using the Null-Coalescing Operator Overriding Null State Analysis Disabling Null State Analysis Warnings Using String Interpolation Using Object and Collection Initializers Using an Index Initializer Using Target-Typed New Expressions Pattern Matching Pattern Matching in switch Statements Using Extension Methods Applying Extension Methods to an Interface Creating Filtering Extension Methods Using Lambda Expressions Defining Functions Using Lambda Expression Methods and Properties Using Type Inference and Anonymous Types Using Anonymous Types Using Default Implementations in Interfaces Using Asynchronous Methods Working with Tasks Directly Applying the async and await Keywords Using an Asynchronous Enumerable Getting Names Summary Chapter 6: Testing ASP.NET Core Applications Preparing for This Chapter Opening the Project Selecting the HTTP Port Enabling the MVC Framework Creating the Application Components Creating the Data Model Creating the Controller and View Running the Example Application Creating a Unit Test Project Removing the Default Test Class Writing and Running Unit Tests Running Tests with the Visual Studio Test Explorer Running Tests with Visual Studio Code Running Tests from the Command Line Correcting the Unit Test Isolating Components for Unit Testing Isolating a Component Using a Mocking Package Creating a Mock Object Summary Chapter 7: SportsStore: A Real Application Creating the Projects Creating the Unit Test Project Opening the Projects Configuring the HTTP Port Creating the Application Project Folders Preparing the Application Services and the Request Pipeline Configuring the Razor View Engine Creating the Controller and View Starting the Data Model Checking and Running the Application Adding Data to the Application Installing the Entity Framework Core Packages Defining the Connection String Creating the Database Context Class Configuring Entity Framework Core Creating a Repository Creating the Database Migration Creating Seed Data Displaying a List of Products Preparing the Controller Updating the View Running the Application Adding Pagination Displaying Page Links Adding the View Model Adding the Tag Helper Class Adding the View Model Data Displaying the Page Links Improving the URLs Styling the Content Installing the Bootstrap Package Applying Bootstrap Styles Creating a Partial View Summary Chapter 8: SportsStore: Navigation and Cart Adding Navigation Controls Filtering the Product List Refining the URL Scheme Building a Category Navigation Menu Creating the Navigation View Component Generating Category Lists Creating the View Highlighting the Current Category Correcting the Page Count Building the Shopping Cart Configuring Razor Pages Creating a Razor Page Creating the Add To Cart Buttons Enabling Sessions Implementing the Cart Feature Defining Session State Extension Methods Completing the Razor Page Summary Chapter 9: SportsStore: Completing the Cart Refining the Cart Model with a Service Creating a Storage-Aware Cart Class Registering the Service Simplifying the Cart Razor Page Completing the Cart Functionality Removing Items from the Cart Adding the Cart Summary Widget Adding the Font Awesome Package Creating the View Component Class and View Submitting Orders Creating the Model Class Adding the Checkout Process Creating the Controller and View Implementing Order Processing Extending the Database Creating the Order Repository Completing the Order Controller Displaying Validation Errors Displaying a Summary Page Summary Chapter 10: SportsStore: Administration Preparing Blazor Server Creating the Imports File Creating the Startup Razor Page Creating the Routing and Layout Components Creating the Razor Components Checking the Blazor Setup Managing Orders Enhancing the Model Displaying Orders to the Administrator Adding Catalog Management Expanding the Repository Applying Validation Attributes to the Data Model Creating the List Component Creating the Detail Component Creating the Editor Component Deleting Products Summary Chapter 11: SportsStore: Security and Deployment Creating the Identity Database Installing the Identity Package for Entity Framework Core Creating the Context Class Defining the Connection String Configuring the Application Creating and Applying the Database Migration Defining the Seed Data Adding a Conventional Administration Feature Applying a Basic Authorization Policy Creating the Account Controller and Views Testing the Security Policy Preparing ASP.NET Core for Deployment Configuring Error Handling Creating the Production Configuration Settings Creating the Docker Image Installing Docker Desktop Creating the Docker Configuration Files Publishing and Imaging the Application Running the Containerized Application Summary Part II Chapter 12: Understanding the ASP.NET Core Platform Preparing for This Chapter Running the Example Application Understanding the ASP.NET Core Platform Understanding Middleware and the Request Pipeline Understanding Services Understanding the ASP.NET Core Project Understanding the Entry Point Understanding the Project File Creating Custom Middleware Defining Middleware Using a Class Understanding the Return Pipeline Path Short-Circuiting the Request Pipeline Creating Pipeline Branches Creating Terminal Middleware Configuring Middleware Using the Options Pattern with Class-Based Middleware Summary Chapter 13: Using URL Routing Preparing for This Chapter Understanding URL Routing Adding the Routing Middleware and Defining an Endpoint Simplifying the Pipeline Configuration Understanding URL Patterns Using Segment Variables in URL Patterns Refactoring Middleware into an Endpoint Generating URLs from Routes Managing URL Matching Matching Multiple Values from a Single URL Segment Using Default Values for Segment Variables Using Optional Segments in a URL Pattern Using a catchall Segment Variable Constraining Segment Matching Constraining Matching to a Specific Set of Values Defining Fallback Routes Advanced Routing Features Creating Custom Constraints Avoiding Ambiguous Route Exceptions Accessing the Endpoint in a Middleware Component Summary Chapter 14: Using Dependency Injection Preparing for This Chapter Creating a Middleware Component and an Endpoint Configuring the Request Pipeline Understanding Service Location and Tight Coupling Understanding the Service Location Problem Understanding the Tightly Coupled Components Problem Using Dependency Injection Using a Service in a Middleware Class Using a Service in an Endpoint Getting Services from the HttpContext Object Using an Adapter Function Using the Activation Utility Class Using Service Lifecycles Creating Transient Services Avoiding the Transient Service Reuse Pitfall Using Scoped Services Avoiding the Scoped Service Validation Pitfall Accessing Scoped Services Through the Context Object Creating New Handlers for Each Request Using Scoped Services in Lambda Expressions Other Dependency Injection Features Creating Dependency Chains Accessing Services in the Program.cs File Using Service Factory Functions Creating Services with Multiple Implementations Using Unbound Types in Services Summary Chapter 15: Using the Platform Features, Part 1 Preparing for This Chapter Using the Configuration Service Understanding the Environment-Specific Configuration File Accessing Configuration Settings Using the Configuration Data in the Program.cs File Using Configuration Data with the Options Pattern Understanding the Launch Settings File Using the Environment Service Storing User Secrets Storing User Secrets Reading User Secrets Using the Logging Service Generating Logging Messages Logging Messages in the Program.cs File Logging Messages with Attributes Configuring Minimum Logging Levels Logging HTTP Requests and Responses Using Static Content and Client-Side Packages Adding the Static Content Middleware Changing the Default Options for the Static Content Middleware Using Client-Side Packages Preparing the Project for Client-Side Packages Installing Client-Side Packages Using a Client-Side Package Summary Chapter 16: Using the Platform Features, Part 2 Preparing for This Chapter Using Cookies Enabling Cookie Consent Checking Managing Cookie Consent Using Sessions Configuring the Session Service and Middleware Using Session Data Working with HTTPS Connections Enabling HTTPS Connections Detecting HTTPS Requests Enforcing HTTPS Requests Enabling HTTP Strict Transport Security Handling Exceptions and Errors Returning an HTML Error Response Enriching Status Code Responses Filtering Requests Using the Host Header Summary Chapter 17: Working with Data Preparing for This Chapter Caching Data Caching Data Values Using a Shared and Persistent Data Cache Creating the Persistent Cache Service Caching Responses Using Entity Framework Core Installing Entity Framework Core Creating the Data Model Configuring the Database Service Creating and Applying the Database Migration Seeding the Database Using Data in an Endpoint Enabling Sensitive Data Logging Summary Part III Chapter 18: Creating the Example Project Creating the Project Adding a Data Model Adding NuGet Packages to the Project Creating the Data Model Preparing the Seed Data Configuring Entity Framework Core Services and Middleware Creating and Applying the Migration Adding the CSS Framework Configuring the Request Pipeline Running the Example Application Summary Chapter 19: Creating RESTful Web Services Preparing for This Chapter Understanding RESTful Web Services Understanding Request URLs and Methods Understanding JSON Creating a Web Service Using the Minimal API Creating a Web Service Using a Controller Enabling the MVC Framework Creating a Controller Understanding the Base Class Understanding the Controller Attributes Understanding Action Method Results Using Dependency Injection in Controllers Using Model Binding to Access Route Data Model Binding from the Request Body Adding Additional Actions Improving the Web Service Using Asynchronous Actions Preventing Over-Binding Using Action Results Performing Redirections Redirecting to an Action Method Validating Data Applying the API Controller Attribute Omitting Null Properties Projecting Selected Properties Configuring the JSON Serializer Summary Chapter 20: Advanced Web Service Features Preparing for This Chapter Dropping the Database Running the Example Application Dealing with Related Data Breaking Circular References in Related Data Supporting the HTTP PATCH Method Understanding JSON Patch Installing and Configuring the JSON Patch Package Defining the Action Method Understanding Content Formatting Understanding the Default Content Policy Understanding Content Negotiation Enabling XML Formatting Fully Respecting Accept Headers Specifying an Action Result Format Requesting a Format in the URL Restricting the Formats Received by an Action Method Documenting and Exploring Web Services Resolving Action Conflicts Installing and Configuring the Swashbuckle Package Fine-Tuning the API Description Running the API Analyzer Declaring the Action Method Result Type Summary Chapter 21: Using Controllers with Views, Part I Preparing for This Chapter Dropping the Database Running the Example Application Getting Started with Views Configuring the Application Creating an HTML Controller Understanding Convention Routing Understanding the Razor View Convention Creating a Razor View Modifying a Razor View Selecting a View by Name Using Shared Views Working with Razor Views Setting the View Model Type Using a View Imports File Understanding the Razor Syntax Understanding Directives Understanding Content Expressions Setting Element Content Setting Attribute Values Using Conditional Expressions Enumerating Sequences Using Razor Code Blocks Summary Chapter 22: Using Controllers with Views, Part II Preparing for This Chapter Dropping the Database Running the Example Application Using the View Bag Using Temp Data Working with Layouts Configuring Layouts Using the View Bag Using a View Start File Overriding the Default Layout Using Layout Sections Using Optional Layout Sections Testing for Layout Sections Using Partial Views Enabling Partial Views Creating a Partial View Applying a Partial View Selecting the Partial View Model Using an Expression Understanding Content-Encoding Understanding HTML Encoding Understanding JSON Encoding Summary Chapter 23: Using Razor Pages Preparing for This Chapter Running the Example Application Understanding Razor Pages Configuring Razor Pages Creating a Razor Page Understanding the URL Routing Convention Understanding the Page Model Understanding the Page View Understanding the Generated C# Class Understanding Razor Pages Routing Specifying a Routing Pattern in a Razor Page Adding Routes for a Razor Page Understanding the Page Model Class Using a Code-Behind Class File Adding a View Imports File Understanding Action Results in Razor Pages Using an Action Result Handling Multiple HTTP Methods Selecting a Handler Method Understanding the Razor Page View Creating a Layout for Razor Pages Using Partial Views in Razor Pages Creating Razor Pages Without Page Models Summary Chapter 24: Using View Components Preparing for This Chapter Dropping the Database Running the Example Application Understanding View Components Creating and Using a View Component Applying a View Component Applying View Components Using a Tag Helper Applying View Components in Razor Pages Understanding View Component Results Returning a Partial View Returning HTML Fragments Getting Context Data Providing Context from the Parent View Using Arguments Using a Default Parameter Value Creating Asynchronous View Components Creating View Components Classes Creating a Hybrid Controller Class Summary Chapter 25: Using Tag Helpers Preparing for This Chapter Dropping the Database Running the Example Application Creating a Tag Helper Defining the Tag Helper Class Receiving Context Data Producing Output Registering Tag Helpers Using a Tag Helper Narrowing the Scope of a Tag Helper Widening the Scope of a Tag Helper Advanced Tag Helper Features Creating Shorthand Elements Creating Elements Programmatically Prepending and Appending Content and Elements Inserting Content Around the Output Element Inserting Content Inside the Output Element Getting View Context Data Working with Model Expressions Working with the Page Model Coordinating Between Tag Helpers Suppressing the Output Element Using Tag Helper Components Creating a Tag Helper Component Expanding Tag Helper Component Element Selection Summary Chapter 26: Using the Built-in Tag Helpers Preparing for This Chapter Adding an Image File Installing a Client-Side Package Dropping the Database Running the Example Application Enabling the Built-in Tag Helpers Transforming Anchor Elements Using Anchor Elements for Razor Pages Using the JavaScript and CSS Tag Helpers Managing JavaScript Files Selecting JavaScript Files Narrowing the Globbing Pattern Excluding Files Working with Content Delivery Networks Managing CSS Stylesheets Selecting Stylesheets Working with Content Delivery Networks Working with Image Elements Using the Data Cache Setting Cache Expiry Setting a Fixed Expiry Point Setting a Last-Used Expiry Period Using Cache Variations Using the Hosting Environment Tag Helper Summary Chapter 27: Using the Forms Tag Helpers Preparing for This Chapter Dropping the Database Running the Example Application Understanding the Form Handling Pattern Creating a Controller to Handle Forms Creating a Razor Page to Handle Forms Using Tag Helpers to Improve HTML Forms Working with Form Elements Setting the Form Target Transforming Form Buttons Working with input Elements Transforming the input Element type Attribute Formatting input Element Values Applying Formatting via the Model Class Displaying Values from Related Data in input Elements Working with label Elements Working with Select and Option Elements Populating a select Element Working with Text Areas Using the Anti-forgery Feature Enabling the Anti-forgery Feature in a Controller Enabling the Anti-forgery Feature in a Razor Page Using Anti-forgery Tokens with JavaScript Clients Summary Chapter 28: Using Model Binding Preparing for This Chapter Dropping the Database Running the Example Application Understanding Model Binding Binding Simple Data Types Binding Simple Data Types in Razor Pages Understanding Default Binding Values Binding Complex Types Binding to a Property Binding Nested Complex Types Specifying Custom Prefixes for Nested Complex Types Selectively Binding Properties Selectively Binding in the Model Class Binding to Arrays and Collections Binding to Arrays Specifying Index Positions for Array Values Binding to Simple Collections Binding to Dictionaries Binding to Collections of Complex Types Specifying a Model Binding Source Selecting a Binding Source for a Property Using Headers for Model Binding Using Request Bodies as Binding Sources Manually Model Binding Summary Chapter 29: Using Model Validation Preparing for This Chapter Dropping the Database Running the Example Application Understanding the Need for Model Validation Validating Data Displaying Validation Messages Understanding the Implicit Validation Checks Performing Explicit Validation Configuring the Default Validation Error Messages Displaying Property-Level Validation Messages Displaying Model-Level Messages Explicitly Validating Data in a Razor Page Specifying Validation Rules Using Metadata Creating a Custom Property Validation Attribute Creating a Custom Model Validation Attribute Using a Custom Model Validation Attribute in a Razor Page Performing Client-Side Validation Performing Remote Validation Performing Remote Validation in Razor Pages Summary Chapter 30: Using Filters Preparing for This Chapter Enabling HTTPS Connections Dropping the Database Running the Example Application Using Filters Using Filters in Razor Pages Understanding Filters Creating Custom Filters Understanding Authorization Filters Creating an Authorization Filter Understanding Resource Filters Creating a Resource Filter Creating an Asynchronous Resource Filter Understanding Action Filters Creating an Action Filter Implementing an Action Filter Using the Attribute Base Class Using the Controller Filter Methods Understanding Page Filters Creating a Page Filter Using the Page Model Filter Methods Understanding Result Filters Understanding Always-Run Result Filters Creating a Result Filter Implementing a Result Filter Using the Attribute Base Class Understanding Exception Filters Creating an Exception Filter Managing the Filter Lifecycle Creating Filter Factories Using Dependency Injection Scopes to Manage Filter Lifecycles Creating Global Filters Understanding and Changing Filter Order Changing Filter Order Summary Chapter 31: Creating Form Applications Preparing for This Chapter Dropping the Database Running the Example Application Creating an MVC Forms Application Preparing the View Model and the View Reading Data Creating Data Editing Data Deleting Data Creating a Razor Pages Forms Application Creating Common Functionality Defining Pages for the CRUD Operations Creating New Related Data Objects Providing the Related Data in the Same Request Breaking Out to Create New Data Summary Part IV Chapter 32: Creating the Example Project Creating the Project Adding NuGet Packages to the Project Adding a Data Model Preparing the Seed Data Configuring Entity Framework Core Services and Middleware Creating and Applying the Migration Adding the Bootstrap CSS Framework Configuring the Services and Middleware Creating a Controller and View Creating a Razor Page Running the Example Application Summary Chapter 33: Using Blazor Server, Part 1 Preparing for This Chapter Understanding Blazor Server Understanding the Blazor Server Advantages Understanding the Blazor Server Disadvantages Choosing Between Blazor Server and Angular/React/Vue.js Getting Started with Blazor Configuring ASP.NET Core for Blazor Server Adding the Blazor JavaScript File to the Layout Creating the Blazor Imports File Creating a Razor Component Using a Razor Component Understanding the Basic Razor Component Features Understanding Blazor Events and Data Bindings Handling Events from Multiple Elements Processing Events Without a Handler Method Preventing Default Events and Event Propagation Working with Data Bindings Changing the Binding Event Creating DateTime Bindings Using Class Files to Define Components Using a Code-Behind Class Defining a Razor Component Class Summary Chapter 34: Using Blazor Server, Part 2 Preparing for This Chapter Combining Components Configuring Components with Attributes Setting and Receiving Bulk Configuration Settings Configuring a Component in a Controller View or Razor Page Creating Custom Events and Bindings Creating a Custom Binding Displaying Child Content in a Component Creating Template Components Using Generic Type Parameters in Template Components Using a Generic Template Component Adding Features to the Generic Template Component Reusing a Generic Template Component Cascading Parameters Handling Errors Handling Connection Errors Handling Uncaught Application Errors Using Error Boundaries Defining Error Content within the Boundary Recovering from Exceptions Summary Chapter 35: Advanced Blazor Features Preparing for This Chapter Using Component Routing Preparing the Razor Page Adding Routes to Components Setting a Default Component Route Navigating Between Routed Components Receiving Routing Data Defining Common Content Using Layouts Applying a Layout Understanding the Component Lifecycle Methods Using the Lifecycle Methods for Asynchronous Tasks Managing Component Interaction Using References to Child Components Interacting with Components from Other Code Interacting with Components Using JavaScript Invoking a JavaScript Function from a Component Retaining References to HTML Elements Invoking a Component Method from JavaScript Invoking an Instance Method from a JavaScript Function Summary Chapter 36: Blazor Forms and Data Preparing for This Chapter Dropping the Database and Running the Application Using the Blazor Form Components Creating Custom Form Components Validating Form Data Handling Form Events Using Entity Framework Core with Blazor Understanding the Entity Framework Core Context Scope Issue Discarding Unsaved Data Changes Creating New Dependency Injection Scopes Understanding the Repeated Query Issue Managing Queries in a Component Performing Create, Read, Update, and Delete Operations Creating the List Component Creating the Details Component Creating the Editor Component Extending the Blazor Form Features Creating a Custom Validation Constraint Creating a Valid-Only Submit Button Component Summary Chapter 37: Using Blazor Web Assembly Preparing for This Chapter Dropping the Database and Running the Application Setting Up Blazor WebAssembly Creating the Shared Project Creating the Blazor WebAssembly Project Preparing the ASP.NET Core Project Adding the Solution References Opening the Projects Completing the Blazor WebAssembly Configuration Setting the Base URL Setting the Static Web Asset Base Path Testing the Placeholder Components Creating a Blazor WebAssembly Component Importing the Data Model Namespace Creating a Component Navigating in a Blazor WebAssembly Component Getting Data in a Blazor WebAssembly Component Creating a Layout Defining CSS Styles Completing the Blazor WebAssembly Form Application Creating the Details Component Creating the Editor Component Summary Chapter 38: Using ASP.NET Core Identity Preparing for This Chapter Preparing the Project for ASP.NET Core Identity Preparing the ASP.NET Core Identity Database Configuring the Database Connection String Configuring the Application Creating and Applying the Identity Database Migration Creating User Management Tools Preparing for User Management Tools Enumerating User Accounts Creating Users Validating Passwords Validating User Details Editing Users Deleting Users Creating Role Management Tools Preparing for Role Management Tools Enumerating and Deleting Roles Creating Roles Assigning Role Membership Summary Chapter 39: Applying ASP.NET Core Identity Preparing for This Chapter Authenticating Users Creating the Login Feature Inspecting the ASP.NET Core Identity Cookie Creating a Sign-Out Page Testing the Authentication Feature Enabling the Identity Authentication Middleware Authorizing Access to Endpoints Applying the Authorization Attribute Enabling the Authorization Middleware Creating the Access Denied Endpoint Creating the Seed Data Testing the Authentication Sequence Authorizing Access to Blazor Applications Performing Authorization in Blazor Components Displaying Content to Authorized Users Authenticating and Authorizing Web Services Building a Simple JavaScript Client Restricting Access to the Web Service Using Cookie Authentication Using Bearer Token Authentication Preparing the Application Creating Tokens Authenticating with Tokens Restricting Access with Tokens Using Tokens to Request Data Summary Index