Index

Symbols

.NET

app models 541

old versions, removing 14

operating system 290

versions 12

.NET 6 273, 274

supporting, platforms for deployment 6

.NET 6 class library

creating 210

referencing 210

.NET assemblies

decompilation, preventing 301, 302

decompiling 296

decompiling, with ILSpy extension for Visual Studio 2022 296

decompiling, with ILSpy extension for Visual Studio Code 297-301

.NET blog

reference link 43

subscribing to 43

.NET CLI

project, managing 291

.NET components

about 277

Base Class Libraries (BCL or CoreFX) 277

Common Language Runtime (CoreCLR) 277

language compilers 277

.NET Core 11

.NET Core 1.0 274

.NET Core 1.1 274

.NET Core 2.0 275

performance, improving to .NET 5 277

.NET Core 2.1 275

.NET Core 2.2 275

.NET Core 3.0 275

.NET Core 3.1 276

.NET Core 3.1 SDK

reference link 287

.NET Core 5.0 276

.NET Core 6.0 276

.NET Framework 10

porting, to modern .NET 309

versus modern .NET 311

.NET Framework versions

.NET 5 274

.NET 6 274

.NET Core 1.x 274

.NET Core 2.x 274

.NET Core 3.x 274

.NET Interactive Notebooks

code, exploring with 29

code, running 31

code, writing 31

creating 30

Markdown, adding to 32

multiple code cells, executing 33, 34

saving 32

special commands, adding to 32

using, for code 34

.NET Interactive Notebooks extension

advantages 3

disadvantages 4

.NET learning

application type, selecting 3

tool, selecting 3

.NET Multi-platform App User Interfaces (MAUI) 545

.NET platforms

book editions 16, 17

.NET plugin

using 720

.NET Portability Analyzer 311

.NET Runtime version 13

.NET SDK

controlling 286, 287

download link 8

update, checking 277

.NET SDK version 13

output 52

.NET Standard 15, 16

used, for sharing code with legacy platforms 284

.NET Standard 2.0 class library

creating 285

.NET support 13

.NET technologies

comparing 17

.NET tools

book editions 16, 17

.NET types

C# aliases, mapping to 282

C# keywords, relating 281, 282

extending 261

inheriting 261

location, revealing 283

.NET Upgrade Assistant 311

.NET version 12

.NET WebAssembly build tools 759

A

abstract classes

inheriting from 255

abstract stream 378

access control

with indexers 206

with properties 206

access modifier 180

action 626

action method return types 681

Active Server Pages (ASP) 572

advanced features

implementing, for web services 707

ahead-of-time (AOT) 759

analyzer

using, to write code 265-267

anonymous inline delegate

implementing, as middleware 610-612

API conventions

implementing 709

application type

selecting, for learning C# and .NET 3

app models

for C# 541

for .NET 541

app size

reducing, with app trimming 295

app trimming

assembly-level trimming, enabling 295

member-level trimming, enabling 295

type-level trimming, enabling 295

used, for reducing app size 295

ASP.NET Core 573

about 572

Entity Framework Core, using 593

features 546

providing, technologies for building websites 542

services and pipeline, configuring 582-584

used, for building websites 542

website, enabling to serve static content 584

ASP.NET Core 1.0 546

ASP.NET Core 1.1 546

ASP.NET Core 2.0 546

ASP.NET Core 2.1 547

ASP.NET Core 2.2 547

ASP.NET Core 3.0 548

ASP.NET Core 3.1 548

ASP.NET Core 5.0 548

ASP.NET Core 6.0 548

ASP.NET Core Identity 547

ASP.NET Core Identity database

reviewing 622

ASP.NET Core MVC 542

category images, setting up 643

creating 616

customized home page, reviewing 647, 648

customizing 643

custom style, defining 643

exploring 618, 622

initializing 622, 624

model binders 651, 652

model, validating 654-657

parameters, passing with route value 648-650

Razor syntax 643, 644

route 625

setting up 615

typed view, defining 644, 647

view helper methods 657, 658

ASP.NET Core project

creating 574, 575

secure connection, redirecting 579, 580

stricter security, enabling 579, 580

website, securing 576, 578

website, testing 576, 578

ASP.NET Core Razor Pages 542

code, adding 587, 588

code-behind files, using 591, 592

enabling 586, 587

exploring 586

form, defining to insert supplier model 597

shared layouts, using 588-591

supplier model, enabling to insert entities 596

used, for manipulating data 596

ASP.NET Core Web API 544

project, creating 671-673

used, for building web services 667

ASP.NET MVC 573

ASP.NET SignalR 573

ASP.NET Web API 573

ASP.NET Web Forms 572

assembly 17, 278

namespace 279

types 279

versioning 355

AssemblyBuilder Class

reference link 360

assembly metadata

reading 355, 357

assembly parts

embedded resources 354

IL code 354

metadata and manifest 354

type metadata 354

assembly unloadability in .NET Core

reference link 360

assignment operator 98

asynchronous tasks

used, for improving scalability 662

async keyword 532

responsiveness for console apps, improving 532

responsiveness for GUI apps, improving 533-537

scalability for web applications, improving 537

scalability for web services, improving 537

async streams

working with 538, 539

attributes

working with 354

authentication database

creating, for SQL Server LocalDB 617

auto-sorting collections 347

Avalonia 546

await keyword 532

multitasking 537

responsiveness for console apps, improving 532

responsiveness for GUI apps, improving 533-536

scalability for web applications, improving 537

scalability for web services, improving 537

using, in catch blocks 537

Azure Functions 544

B

bag

about 478

working with, LINQ 478

Banker's Rounding 117

Base64 118

Base Class Library (BCL) 10, 273

Benchmark.NET

used, for monitoring performance and memory 512-515

binary arithmetic operators

exploring 97, 98

binary number system 68

binary object

converting, into string 118

binary shift operators 101

exploring 101, 102

bitwise operators 101

exploring 101, 102

Blazor 542, 719

JavaScript, using 720

Silverlight 720

versus Razor 722

WebAssembly (Wasm) 720

Blazor components 721, 722

customer form component, building 746-748

customer form component, testing 749, 750

customer form component, using 746, 748

forms, defining with EditForm component 745

service, abstracting 742-744

Blazor hosting models

about 720

Blazor Server 720

Blazor WebAssembly 721

.NET MAUI Blazor App 721

Blazor Hybrid 721

Blazor Mobile Bindings 722

Blazor project templates

comparing 723

Blazor routing, to page components 729

base component classes 730, 731

Blazor routes, navigating 729

navigation link component, using with routes 732

routable page component, defining 729

route parameters, passing 730

Blazor Server 542

Blazor Server components

building 737

defining 738

entities, obtaining 739-742

routable page component 738, 739

testing 737, 738

Blazor Server project template

reviewing 723-728

running 732, 733

Blazor WebAssembly 542

Blazor WebAssembly 3.2 548

Blazor WebAssembly apps

AOT, enabling 759, 760

Blazor component libraries 767

Blazor components, sharing in class library 763, 764

browser compatibility analyzer 762

improving 758

JavaScript Interop, using 765-767

Blazor WebAssembly component

building 750

client, configuring 754, 757

server, configuring 751, 752

service, testing 757, 758

Blazor WebAssembly project template

reviewing 733-737

block

about 56

example 56

book solution code repository

cloning 38, 39

braces

using, with if statements 105

breakpoints

customizing 151-153

Brotli algorithm

compressing with 388-390

browser

used, for testing GET requests 688, 689

byte arrays

strings, encoding 391-393

C

C#

app models 541

C# 1.0 48

C# 2.0 48

C# 3.0 48

C# 4.0 48

C# 5.0 49

C# 6.0 49

C# 7.0 49

C# 7.1 49

C# 7.2 50

C# 7.3 50

C# 8 50

C# 9 50

pattern matching, enhancement 213

C# 10 50

C# aliases

mapping, to .NET types 282

call stack 168-170

cardinal numbers 136

casting 113

casting exception

avoiding 260, 261

C# code

writing 58

C# compiler versions

discovering 51, 52

C# grammar 53, 55

checked statement 125

used, for throwing overflow exceptions 125, 127

child task 522, 523

C# keywords

relating, to .NET types 281, 282

C# language 47

C# language, versions and features 47

C# 1.0 48

C# 2.0 48

C# 3.0 48

C# 4.0 48

C# 5.0 49

C# 6.0 49

C# 7.0 49

C# 7.1 49

C# 7.2 50

C# 7.3 50

C# 8 50

C# 9 50

C# 10 50

class

assembly, referencing 182

defining, in namespace 179

extending, to add functionality 252

inheriting 252

instantiating 181

splitting, with partial keyword 205

classic ASP.NET

versus modern ASP.NET Core 573

class library

building 178

creating 178, 179

creating, for entity models with SQLite 554, 555

creating, for entity models with SQL Server 562-565

creating, for Northwind database context 559-562

defaults, with SDKs 284

setting up 220, 221

class library package

testing 308, 309

class-to-table mapping

improving 555-559

C# learning

application type, selecting 3

tool, selecting 3

client-side web development technologies 572

code

internationalizing 362

code by delete

simplifying, with explicit delegate instantiation 474

code for deployment

publishing 287

code performance

monitoring 506

collections

features 335, 336

for special situations 347

good practice with 348, 349

methods summary 340

multiple objects, storing 334

options 337

performance, improving by ensuring capacity 336

sorting 346

color scheme

modifying, for C# syntax 57

command-line

Git, using with 38

command-line interface (CLI) 289

comment 55

Common Language Runtime (CLR) 10

Community Edition 6

compact array of bit values

working with 347

compact XML

generating 397, 398

compiler-generated display class 360

compiler overflow checks

disabling, with unchecked statement 127, 128

compiler version

displaying 53, 54

complex comma-separated string

splitting 333

complex numbers 319

working with 319

conch

lock, applying to 526, 527

concrete stream 378

conditional logical operators 100

exploring 100, 101

Configure method

HTTP request pipeline, setting up 608

ConfigureServices method

services, registering 606-608

connection string 417

console app

creating, for working with EF Core 409

console application

arguments, passing 86-88

building, with Visual Studio 2022 18

building, with Visual Studio Code 24

creating, to publish 288

exploring 80

key input, obtaining from user 85

options, setting with arguments 88-90

platforms, handling 90, 91

setting up 220, 221

text input, obtaining from user 84

usage 84

user output, displaying 81

content management system (CMS) 542

used, for building websites 542, 543

continuation task

defining 520, 521

controller 626

responsibilities 628

controller action methods asynchronous

creating 662, 663

ControllerBase class 626

Controller class 627, 628

CoreCLR 11, 17

CoreFX 11

C# plugin

using 720

CPU operations

atomic creation 530, 531

Cross-Origin Resource Sharing (CORS) 582

enabling 705, 706

cross-platform console app

publishing 292, 293

cross-platform development

Visual Studio Code, using for 4

CSS isolation 729

C# standards 51

C# syntax

used, for modifying color scheme 57

culture 362

CultureInfo type

using, in System.Globalization namespace 363-365

custom attributes

creating 358, 359

customer repository

configuring 683, 686

customers

obtaining, as JSON in controller 703-705

C# vocabulary 53, 57, 63-65

D

database

querying 659-661

Data Definition Language (DDL) 421

data repositories

creating, for entities 677

data seeding

with Fluent API 423

data storing, within field

about 184

access modifiers 185

field, defining 184, 185

field values, outputting 186

field values, setting 186

multiple value, storing with enum type 188, 189

value, storing with enum type 187, 188

data, with EF Core

database contexts, pooling 454

entities, deleting 453, 454

entities, inserting 450-452

entities, updating 452, 453

manipulating 450

date

working with 329

DateOnly 329

dates and times

globalization with 327, 328

types 325

values, specifying 325-327

working with 325

deadlocks

avoiding 528, 529

Debug

instrumenting with 154

debugging

breakpoints, customizing 151-153

code, creating with deliberate bug 144, 145

issues, at development time 144

stepping, through code 150, 151

windows 149

debugging toolbar

navigating with 148, 149

decimal number system 68

default trace listener

writing 154

deferred execution 348, 470, 471

delegates 226

defining 227-229

handling 227-229

used, for calling methods 226, 227

deliberate bug

code, creating with 144, 145

dependency injection (DI) 624

dependent assemblies 278

deserialization 394

desktop apps

building 545

destructor 244

development environment

setting up 2

dictionaries 338, 339

working with 342, 343

display templates

using 659-661

Dispose method

ensuring 246

DNS

working with 352, 353

Don't Repeat Yourself (DRY) 131

do statement

looping with 111

Dotfuscator tool 301

dotnet CLI

used, for compiling code 27

used, for running code 27

dotnet commands

about 289

project, creating 289

dotnet tool

help, obtaining for 39

double-opt-in (DOI) 619

doubly linked list

working with 347

dynamic link library (.dll) 278

E

EF Core

LINQ, using 480

EF Core model

annotation attributes, using 421-423

building 480-483

building, for Northwind tables 423

Category entity classes, defining 424, 425

conventions, using 421

defining 420

defining, as Code First 456-462

dotnet-ef tool, setting up 427, 428

filtered include entities 435, 436

Fluent API, using 423

global filters, defining 445

logging, with custom logging provider 439, 441

pattern matching, with Like method 444, 445

preconvention model, configuring 432, 433

Product entity classes, defining 424, 425

products, filtering 437, 438

products, sorting 437, 438

querying 433, 434

scaffolding, with existing database 428-432

SQL statements, generating 438, 439

tables, adding to Northwind database context class 426, 427

endpoint routing

about 604

configuration, reviewing 605, 606

configuring 605

entities

filtering, with where method 471, 472

sorting 475

sorting, by single property with OrderBy 475

sorting, by subsequent property with ThenBy 475

entity data models

building, for Northwind database 553

class library creating, with SQLite 554, 555

class library creating, with SQL Server 562-565

Entity Framework 6 (EF6) 408

Entity Framework Core (EF Core) 408

configuring, as service 593, 594

database, connecting 417, 418

database provider, selecting 417

dependency service, injecting into ASP.NET Core Razor Pages 597

setting up 417

using, with ASP.NET Core 593

working with, console app 409

Entity Framework Core (EF Core), approaches

code first 409

database first 409

Entity Framework (EF) 408

Entity Framework (EF) 6 15

entity models 637-639

enumerable class

used, for building LINQ expressions 468, 470

equality type 241, 242

error-prone code

wrapping, in try block 121, 123

events

defining 229

handling 225, 229

raising 225

synchronizing 529

exception

catch, deciding 171

catching 123

catching, in functions 167

handling 121

inheriting 261, 262

rethrowing 171, 172

throwing, in functions 167, 168

executable (.exe) 278

execution errors 167

explicit casting 113, 259

explicit delegate instantiation

code by delete, simplifying 474

explicit transaction

defining 455, 456

expression-bodied function members 142

eXtensible Application Markup Language (XAML) 550

eXtensible Markup Language (XML) 394

extension methods 263

using, to reuse functionality 264, 265

F

Fibonacci sequence 142

field, categories

constant 181

event 181

read-only 181

fields 62, 63

file resources

disposal, simplifying by using statement 385

disposing 383, 384

files

reviewing, for project 35

text, decoding 393

text, encoding 393

filesystem

cross-platform environments, handling 369-371

cross-platform filesystems, handling 369-371

directories, managing 372, 373

drives, managing 371, 372

file information, obtaining 376, 377

files, controlling 377

files, managing 374, 375

managing 369

paths, managing 375, 376

filtered include entities 435

filtering by type 476, 477

filters 631

catching with 125

role management, enabling 632-635

role programmatically, creating 632-635

using, to cache response 635, 636

using, to define custom route 636

using, to secure action method 631, 632

first-in, first-out (FIFO) 339

flight passengers

defining 211, 212

Fluent API

data seeding 423

using 423

folders

reviewing, for project 35

foreach statement 113

looping with 112

for statement

looping with 112

framework 280

Framework-dependent deployment (FDD) 287

Framework-dependent executables (FDE) 287

function

creating, to convert number from cardinal to ordinal 136, 137

exception, catching 167

exception, throwing 167, 168

factorials, calculating with recursion 137-140

value return 134, 135

writing 131

functionality

implementing, with local function 224

implementing, with methods 221-223

implementing, with operators 223, 224

functional languages

attributes 141

function implementations

lambdas, using 141-143

function pointers 226

function stream 379

G

General Availability (GA) 314, 668

General Data Protection Regulation (GDPR) 547

generic parameters 231

generics 74, 190, 230

used, for creating types reusable 230

generic types

working with 231, 232

GET requests

creating, with REST Client 690, 691

testing, with browser 688, 689

Git

installation link 38

using, with command-line 38

using, with Visual Studio Code 38

GitHub Codespaces

using, for development in cloud 4

GitHub repository 36

creating, for best usage 36

feedback, providing 37

issues, raising with book 36, 37

solution code, downloading from 37, 38

Global Assembly Cache (GAC) 10

global imports 22

globalization 362

Google

used, for searching answers 43

Google Chrome

using, to create HTTP requests 569-572

Go To Definition feature

using 40-42

graphical user interface (GUI) 14, 532

GraphQL 544

GroupJoin method 487

gRPC 544, 668

H

hardware

used, for writing and testing code 5

headless CMS 543

Health Check API

implementing 708

heap memory 239

hosting environment

controlling 580, 581

HttpClient 702

HttpClientFactory

used, for configuring HTTP clients 702

HTTP clients

configuring, with HttpClientFactory 702

used, for consuming web services 702

HTTP logging

enabling 700-702

HTTP pipeline

visualizing 610

HTTP request pipeline

configuring 604

setting up, in Configure method 608

HTTP requests

creating, with Google Chrome 569-572

for Web APIs 669, 670

testing, with REST Client extension 690

testing, with Swagger UI 695-700

HTTP responses

for Web APIs 669, 670

used, for working JSON extension methods 404

HTTP Strict Transport Security (HSTS) 579

Humanizer third-party library 430

human language

versus programming language 57

Hypertext Transfer Protocol (HTTP) 567, 568

I

if statement

branching with 104

images

working with 361, 362

ImageSharp 361

immutable collections

using 347, 348

implicit casting 113, 259

implicit transaction 454

indexers

access control 206

defining 209, 210

indexes

using 350, 351

index type

used, for identifying positions 349, 350

inheritance

overriding 256, 257

preventing 257

inheritance hierarchies

casting exception, avoiding 260, 261

casting within 259

explicit casting 259

implicit casting 259

inner function 225

Institute of Electrical and Electronics Engineers (IEEE) 70

Integrated Development Environments (IDEs) 2

interfaces

about 232

defining, with default implementation 237, 238

explicit implementation 236

implementing 232

implicit implementation 236

objects, comparing 233, 234

objects, comparing with separate class 235, 236

intermediate language (IL) 17, 277

internationalization of code 362

International Organization for Standardization (ISO) 362

Internet Information Services (IIS) 573

Internet of Things (IoT) 275

interpolated string 67, 82

invocation operator 103

IP addresses

working with 352, 353

iteration statements 110

exploring 110

J

JavaScript isolation 729

JavaScript Object Notation (JSON) 394, 676

Newtonsoft, migrating to 404

serializing with 399, 400

join method 486

JSON extension methods

working, with HTTP responses 404

JSON processing

controlling 401-404

high-performance 400, 401

just-in-time (JIT) compiler 17

K

key 338

keyboard shortcuts, for Visual Studio Code

reference link 9

key middleware extension methods

summarizing 609

L

lambda expression 474

targeting 474

lambdas

using, in function implementations 141-143

Language INtegrated Query (LINQ) 48, 467, 468

bag, working with 478, 479

sequences, aggregating 490, 491

sequences, filtering 483-485

sequences, grouping 486

sequences, group-joining 488, 489

sequences, joining 486, 487

sequences, projecting into types 485, 486

sequences, sorting 483-485

set, working with 478, 479

using, with EF Core 480

language version compiler

enabling 52, 53

last-in, first-out (LIFO) 339

lazy loading 348

legacy Entity Framework 408

legacy Entity Framework 6.3

using 408

legacy .NET 2

legacy platforms

code sharing, with .NET Standard 284

legacy Windows application platforms 549, 550

modern .NET support for 550

link trim mode 295

LINQ expressions

building, with enumerable class 468, 470

writing 467

LINQ extension method

chainable extension method, trying 498

creating 495-497

median method, trying 498, 499

mode method, trying 498, 499

LINQ query comprehension syntax 491

LINQ syntax

with syntactic sugar 491, 492

LINQ to XML 499

used, for generating XML 499

used, for reading XML 500, 501

working with 499

lists 337

working with 340-342

literal string 67

loading patterns, with EF Core 446

eager loading entities 446

explicit loading entities 448, 449

lazy loading, enabling 447

local function 224

used, for implementing functionality 224

localization 362

local variables

declaring 76

target-typed new, using to instantiate object 78

type, inferring 76, 77

type, specifying 76

lock statement 527

logging 630

default trace listener, writing 154

during, development 153

during, runtime 153

instrumenting, with Debug 154

instrumenting, with Trace 154

options 153

trace listeners, configuring 155, 156

trace switch 157

logging, trace switch

packages, adding to project in Visual Studio 2022 158

packages, adding to project in Visual Studio Code 157

project packages, reviewing 158-161

logical operators

exploring 98, 100

logs

filtering, by provider-specific values 442

Long Term Support (LTS) 12, 276, 547

M

Mac

Microsoft Visual Studio 2022, using for 4

macOS

SQLite, setting up 414

Markdown

adding, to .NET Interactive notebooks 32

member access operator 103

members

defining 181

field 181

hiding 253, 254

methods 181

overriding 254, 255

memory

managing, with reference type 239

managing, with value type 239

MethodBase.Invoke method

reference link 360

method, categories

constructor 181

indexer 181

operator 181

property 181

method overloading 201

methods 62

about 195, 221

calling 195

callings, with delegates 226, 227

parameters, defining 200

parameters, passing 200

used, for implementing functionality 221-223

values, returning 195

writing 195

method signature 201

microservice 544

Microsoft documentation

reading 39

URL 39

Microsoft .NET project SDKs 278

Microsoft SQL Server

downloading 411

installing 411

Northwind database, creating 412

using, for Windows 410

Microsoft Visual Studio

for Windows keyboard shortcuts 7

Microsoft Visual Studio 2022

download link 6

using, for Mac 4

using, for Windows 5

migrations 463

minimal APIs

used, for building weather service 712, 713

used, for building web services 711

minimal weather service

testing 714

mobile apps

building 545

model binders

about 650-652

action methods, disambiguating 652, 653

form parameter, passing 654

parameters 650

route parameter, passing 654

model binding 649

Model-View-Controller (MVC) 542, 615

Model-View-Update (MVU) 545

modern ASP.NET Core

versus classic ASP.NET 573

modern databases 407

modern .NET 2, 14

benefits 310

database development 15

.NET Framework, porting to 309

porting 309

themes 15

versus .NET Framework 311

web development 15

Windows development 14

modern .NET themes

reference link 15

Mono project 10, 11

MSBuild project tools 53

MS Test 162

multiple actions asynchronously

running, with task 518

multiple actions synchronously

running 516, 517

multiple constructor

defining 195

multiple returned values

combining, with tuple 196

multiple threads

app, creating 492, 493

for operating systems 494, 495

using, with parallel LINQ (PLINQ) 492

with macOS 494

with Windows 494

multiple value, storing with collection

about 189, 190

field constant, creating 192

field, initializing with constructor 194

field read-only, creating 193, 194

field static, creating 191, 192

generic collections 190

multiset 478

multi-targeting

reference link 286

MVC model 637

MVC website project structure

reviewing 620, 621

N

named method

targeting 473

named parameter

passing 201, 202

namespace 278

class, defining 180

globally, importing 59, 61

implicitly, importing 59, 61

importing 59

importing, to type 182, 183

importing, to use types 281

in assemblies 279

namespace declaration

simplifying 180

nanoservice 544

native-sized integers 283

nested function 225

nested task 522, 523

NetTopologySuite (NTS) library 275

network resources

DNS, working with 352

IP addresses, working with 352

server, pinging 353, 354

URIs, working with 352

working with 351

Newtonsoft

migrating, to JSON 404

non-generic types

working with 230, 231

non-.NET Standard libraries

using 312, 313

non-nullable parameter

declaring 248-250

non-nullable reference type

enabling 248

non-nullable variable

declaring 248-250

non-null reference types 142

non-polymorphic inheritance 257

Northwind database 409

context class, defining 418, 419, 420

creating, for Microsoft SQL Server 412

creating, for SQLite 415

entity data model, building 553

managing, with Server Explorer 413

managing, with SQLiteStudio 415, 416

web service, creating for 675, 677

Northwind database context

class library, creating 559-562

class table, adding to 426, 427

Northwind tables

used, for building EF Core models 423

Northwind website home page

weather forecasts, adding to 714-716

NoSQL database 407

NuGet distribution libraries

packaging 302

NuGet library

package, publishing to private NuGet feed 307

package, publishing to public NuGet feed 306

packaging 304-306

NuGet package 278, 280

benefits 280

fix dependencies 303

referencing 302

NuGet Package Explorer

about 307

exploring 307, 308

null

checking 250, 251

checking, in method parameter 251

nullable reference type 247, 248

enabling 248

nullable value type

calling 246

null values

working with 246

numbers

big integers, working with 318, 319

complex numbers, working with 319

quaternions 320

working with 318

numbers explicitly

casting 114, 115

numbers implicitly

casting 114, 115

O

object graphs

serializing 394

object-oriented programming (OOP) 177

object-relational mapping (ORM) 408

objects

defining 183

inheriting, from System.Object 184

OData 544

OmniSharp debugger

setting up 144

OOP concept

abstraction 178

aggregation 178

composition 178

encapsulation 178

inheritance 178

polymorphism 178

Open API analyzers

implementing 709

OpenAPI Specification 693

operands 95

operators 95

used, for implementing functionality 223, 224

optional parameter

passing 201, 202

ordered collections 337

ordinal numbers 136

overflow exceptions

throwing, with checked statement 125, 126

P

parallel LINQ (PLINQ)

multiple threads, using 492

parameters

defining, to methods 200

passing, to methods 200-204

simplifying 204

parameter values

naming, with method calling 203

Parse

using, errors 120

partial keyword

used, for splitting classes 205

pattern

matching, with if statement 105

matching, with switch statement 108, 109

pattern matching 142

enhancement, in C# 9 212

with objects 210

performance and memory

monitoring, with Benchmark.NET 512-515

monitoring, with diagnostics 507

personally identifiable information (PII) 701

polymorphic inheritance 257

polymorphism

preventing 257, 258

Portable Class Libraries (PCLs) 284

port numbers

assigning, for projects 569

positional data members

simplifying, in records language 215, 216

postfix operator 97

Postman 690

preemptive multitasking 505

prefix operator 97

preview features

enabling 314, 315

generic mathematics 315

requirement 314

working with 313

problem details

specifying 687

process 505, 506

process string

measuring 510, 511

Process type 508

program debug database file 294

program errors 167

programming language

versus human language 57

Progressive Web App (PWA) 721, 760

exploring 760-762

offline support, implementing 762

projection 480

Project Reunion 550

projects

structuring 550

structuring, in solution/workspace 551

project templates

using 552

properties 63

access control 206

requirement 209

Q

quaternions 320

query

declaring, with specified type 476

declaring, with var type 476

query tags

logging with 443

queues 339

working with 344, 345, 346

R

ranges

using 350, 351

Range type

used, for identifying ranges 350

Razor 640

versus Blazor 722

Razor class libraries 542, 547

Razor class library

compact folder, disabling for Visual Studio Code 599

creating 598

employees feature, implementing with EF Core 600-602

partial view, implementing to single employee 602

testing 603, 604

using 598, 603, 604

read-only properties

defining 206

real numbers

code, writing to explore number sizes 70, 71

double types, versus decimal types 71-73

storing 70

Recorder class

implementing 508-510

records language

about 214, 215

init-only properties 213

positional data members 215

working with 213

record struct type

working with 243

recursion

reference link 138

used, for calculating factorials 137-140

reference type 78

defining 239

storing, in memory 240, 241

used, for managing memory 239

reflection 354

other activities 360

reflection technique 63

ref returns 205

regular expressions

complex comma-separated string, splitting 333

digits entered as text, checking 330, 331

examples 332

pattern matching 330

performance improvements 331

syntax 332

Relational Database Management System (RDBMS) 407

remote procedure call (RPC) 668

Representational State Transfer (REST) 668

resource

accessing, from multiple threads 525, 526

resource usage

monitoring 506

REST Client 690

used, for making GET requests 690, 691

used, for making other requests 692, 693

REST Client extension

used, for testing HTTP requests 690

rounding rules 116

control, taking of 117

S

sample relational database

using 409, 410

scalability

improving, with asynchronous tasks 662

scoped dependency

reference link 683

Secure Sockets Layer (SSL) 105

security HTTP headers

adding 710

segments 625

selection statements 103

sequence 468

serialization 394

server

pinging 353, 354

Server Explorer

used, for managing Northwind database 413

serve static content

default files, enabling 585, 586

folder, creating for static files 584

folder, creating for web page 584

static files, enabling 585, 586

website, enabling to 584

services 544

configuring 604

registering, in ConfigureServices method 606-608

set 478, 340

working with, LINQ 478

settable properties

defining 207, 208

shared resources

access, synchronizing 524

short-circuiting Boolean operators 100

SignalR 544, 547

Simple Object Access Protocol (SOAP) 668

single-file app

publishing 293, 294

single-page application (SPA) 543, 676, 759

software

used, for writing and testing code 5

solution 18

solution code

downloading, from GitHub repository 37, 38

on GitHub 36

SPA frameworks

used, for building web applications 543

spans

using 350, 351

using, memory efficiently 349

special commands

adding, to .NET Interactive notebooks 32

specific exceptions

catching 123, 124

SQLite

Northwind database, creating 415

setting up, for macOS 414

setting up, for other OSes 414

setting up, for Windows 414

used, to creating class library for entity models 554, 555

using 414

SQLiteStudio 415

used, for managing Northwind database 415, 416

SQL Server

used, for creating class library for entity models 562-565

SQL Server LocalDB

used, for creating authentication database 617

stack memory 239

Stack Overflow

answers, obtaining for difficult programming questions 42

stacks 339

statement 55

example 56

statically typed 190

static members 191

static methods 323

using, to reuse functionality 263, 264

Stopwatch type 508

storage stream 379

stream 378

abstract stream 378

compressing 386, 388

concrete stream 378

reading with 378

text, writing 380, 381

writing with 378

XML, writing 381, 382

stream helpers 379

string

binary object, converting into 118

building 324

characters, obtaining 321

checking, for content 323

encoding, as byte arrays 391-393

formatting 323, 324

joining 323, 324

length, obtaining 320

members 323

part, obtaining 322

splitting 321

type, converting into 117

strongly typed 190

struct type

defining 242, 243

Structured Query Language (SQL) 468

StyleCop 265

StyleCop rules

reference link 271

Swagger 690, 693, 694

Swagger UI 693

used, for testing HTTP requests 695-700

switch statement

branching with 106, 107

simplifying, with switch expressions 109, 110

synchronization types

applying 531

System.Convert type

converting 115, 116

system errors 167

System.Globalization namespace

CultureInfo type, using 363-365

T

target-typed new 78

task 505, 506

initiating 518, 519

used, for running multiple actions asynchronously 518

waiting 519

wait method, using 519

wrapping 523, 524

tasks asynchronously

running 516

template packs

installing 552, 553

Test-Driven Development (TDD) 162

tester-doer pattern

implementing 173

issues 173

text

decoding 390

decoding, in files 393

encoding 390

encoding, in files 393

working with 320

thread 505, 506

thread-safe 524

time

working with 329

TimeOnly 329

times table

example 132

times table function

writing 132, 133

tool

selecting, for learning C# and .NET 3

top-level domain (TLD) 568

top-level programs 21

Trace

used, for instrumenting logging 154

trace switch 157

transaction

controlling, with isolation level 455

working with 454

transient fault handling

implementing 709

TryParse method

using, to avoid errors 120

tuple

about 197

deconstructing 198

fields, naming 198

language support 197

types, deconstructing 199, 200

used, for combining multiple returned values 196

tuple name inference 198

tuples 142

type 62, 63

converting, into string 117

evaluating 506

extending 263

in assemblies 279

type-safe method pointer 226

types reusable

creating, with generics 230

U

unary operators

exploring 96

unchecked statement

used, for disabling compiler overflow checks 127, 128

Unicode 390

Unicode characters

in Windows console 436

Uniform Resource Locator (URL) 542, 568

components 568

unit testing 162

class library, creating that needs 162-164

running, with Visual Studio Code 165, 166

types 162

writing 164

Unity project 11

Universal Windows Platform (UWP) 5, 545, 550

unmanaged resources 383

releasing 244-246

Uno platform 545

upsert operation 670

URIs

working with 352, 353

usage errors 167

user agent 567

user interface components 721

user interface (UI) 533

user output

displaying 81

format strings 82, 83

interpolated strings, formatting 82

numbered positional arguments, formatting 81

V

value 338

returning, from methods 196

value type 78

defining 239

storing, in memory 240, 241

used, for managing memory 239

variables 62, 63

Boolean, storing 73

dynamic types, storing 74, 75

literal value 66

multiple values, storing in array 79, 80

naming conventions 66

numbers, storing 68

object type, storing 73, 74

operating 95, 96

real numbers, storing 70

text, storing 66

values, assigning 66

value type, obtaining 78, 79

value type, setting 78, 79

working with 65

verbatim string 67

verbs 62

view 640-642

view engines 640

view helper methods 658

view models 637-639

view search path convention 629, 630

Visual Studio

used, for running unit testing 166

Visual Studio 2022

code, compiling 20

code, running 20

code, writing with 18, 19

compiler-generated folders and files 21

console apps, building with 18

downloading, for Windows 6, 7

implicitly imported namespaces 22, 23

installing, for Windows 6, 7

multiple projects, managing with 18

packages, adding to project in 158

project, adding with 22

top-level programs, writing 21, 22

using 145, 146

Visual Studio Code

code, writing with 24-26

console apps, building with 24

downloading 7, 8

download link 7

extensions, installing 8

Git, using with 38

installing 7, 8

keyboard shortcuts 9

multiple projects, managing with 24

packages, adding to project in 157

project, adding with 27, 28

used, for running unit testing 165

using 146-148

using, for cross-platform development 4

versions 9

W

wait method

using, with task 519

warnings

code, fixing 268, 269

StyleCop recommendation 270, 271

suppressing 267, 268

weather forecasts

adding, to Northwind website home page 714-716

weather service

building, with minimal APIs 712, 713

Web API controller

configuring 683, 686

implementing 681

web applications

building, with SPA frameworks 543

WebAssembly Consensus 720

WebAssembly (Wasm) 720

web development 567

Web Forms 549

web service 668

advanced features, implementing for 707

building, with ASP.NET Core Web API 544, 667

building, with minimal APIs 711

consuming, with HTTP clients 702

creating, for Northwind database 675, 677

documenting 688

functionality, reviewing 674, 675

testing 688

web service acronyms 667, 668

websites

building, with ASP.NET Core 542

building, with content management system (CMS) 542, 543

where method

used, for filtering entities 471, 472

while statement

looping with 110

whole numbers

binary notation, using 69

exploring 69

legibility, improving with digit separators 69

storing 68, 69

Win32 API 549

Windows

Microsoft SQL Server, using 410

Microsoft Visual Studio 2022, using for 5

SQLite, setting up 414

Visual Studio 2022, downloading 6, 7

Visual Studio 2022, installing 6, 7

Windows App SDK 550

Windows Communication Foundation (WCF) 549, 573, 668

gRPC 668

Windows console

Unicode characters 436

Windows Forms 545, 549

Windows keyboard shortcuts

Microsoft Visual Studio for 7

reference link 7

Windows-only desktop apps

technologies 549

Windows Presentation Foundation (WPF) 14, 275, 545, 549

Windows Workflow (WF) 549

WinUI 3 550

workspace 24

X

Xamarin project 10, 11

XML

generating, with LINQ to XML 499

reading, with LINQ to XML 500, 501

serializing 394-396

XML comments

functions, documenting with 140, 141

XML file

deserializing 398, 399

XML serialization

controlling 688

xUnit.net. 162