C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development - Fourth Edition

Book description

Publisher's Note: Microsoft stops supporting .NET Core 3.1 in December 2022. The newer 7th edition of this book is available that covers .NET 7 (end-of-life May 2024) or .NET 6 (end-of-life November 2024), with C# 11 and EF Core 7.

Key Features

  • Build modern, cross-platform applications with .NET Core 3.0
  • Get up to speed with C#, and up to date with all the latest features of C# 8.0
  • Start creating professional web applications with ASP.NET Core 3.0

Book Description

In C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development, Fourth Edition, expert teacher Mark J. Price gives you everything you need to start programming C# applications.

This latest edition uses the popular Visual Studio Code editor to work across all major operating systems. It is fully updated and expanded with new chapters on Content Management Systems (CMS) and machine learning with ML.NET.

The book covers all the topics you need. Part 1 teaches the fundamentals of C#, including object-oriented programming, and new C# 8.0 features such as nullable reference types, simplified switch pattern matching, and default interface methods. Part 2 covers the .NET Standard APIs, such as managing and querying data, monitoring and improving performance, working with the filesystem, async streams, serialization, and encryption. Part 3 provides examples of cross-platform applications you can build and deploy, such as web apps using ASP.NET Core or mobile apps using Xamarin.Forms. The book introduces three technologies for building Windows desktop applications including Windows Forms, Windows Presentation Foundation (WPF), and Universal Windows Platform (UWP) apps, as well as web applications, web services, and mobile apps.

What you will learn

  • Build cross-platform applications for Windows, macOS, Linux, iOS, and Android
  • Explore application development with C# 8.0 and .NET Core 3.0
  • Explore ASP.NET Core 3.0 and create professional web applications
  • Learn object-oriented programming and C# multitasking
  • Query and manipulate data using LINQ
  • Use Entity Framework Core and work with relational databases
  • Discover Windows app development using the Universal Windows Platform and XAML
  • Build mobile applications for iOS and Android using Xamarin.Forms

Who this book is for

Readers with some prior programming experience or with a science, technology, engineering, or mathematics (STEM) background, who want to gain a solid foundation with C# 8.0 and .NET Core 3.0.

Table of contents

  1. Hello, C#! Welcome, .NET!
    1. Setting up your development environment
      1. Using Visual Studio Code for cross-platform development
      2. Using Visual Studio 2019 for Windows app development
      3. Using Visual Studio for Mac for mobile development
      4. Recommended tools for chapters
      5. Deploying cross-platform
      6. Understanding Microsoft Visual Studio Code versions
      7. Downloading and installing Visual Studio Code
      8. Installing other extensions
    2. Understanding .NET
      1. Understanding the .NET Framework
      2. Understanding the Mono and Xamarin projects
      3. Understanding .NET Core
      4. Understanding future versions of .NET
      5. Understanding .NET Core support
      6. What is different about .NET Core?
      7. Understanding .NET Standard
      8. .NET platforms and tools used by the book editions
      9. Understanding intermediate language
      10. Understanding .NET Native
      11. Comparing .NET technologies
    3. Building console apps using Visual Studio Code
      1. Writing code using Visual Studio Code
      2. Compiling and running code using dotnet CLI
    4. Downloading solution code from a GitHub repository
      1. Using Git with Visual Studio Code
      2. Cloning the book solution code repository
    5. Looking for help
      1. Reading Microsoft documentation
      2. Getting help for the dotnet tool
      3. Getting definitions of types and their members
      4. Looking for answers on Stack Overflow
      5. Searching for answers using Google
      6. Subscribing to the official .NET blog
    6. Practicing and exploring
      1. Exercise 1.1 – Test your knowledge
      2. Exercise 1.2 – Practice C# anywhere
      3. Exercise 1.3 – Explore topics
    7. Summary
  2. Speaking C#
    1. Introducing C#
      1. Understanding language versions and features
        1. C# 1.0
        2. C# 2.0
        3. C# 3.0
        4. C# 4.0
        5. C# 5.0
        6. C# 6.0
        7. C# 7.0
        8. C# 7.1
        9. C# 7.2
        10. C# 7.3
        11. C# 8.0
      2. Discovering your C# compiler versions
      3. Enabling a specific language version compiler
    2. Understanding C# basics
      1. Understanding C# grammar
        1. Statements
        2. Comments
        3. Blocks
      2. Understanding C# vocabulary
        1. Help for writing correct code
        2. Verbs are methods
        3. Nouns are types, fields, and variables
        4. Revealing the extent of the C# vocabulary
    3. Working with variables
      1. Naming things and assigning values
        1. Literal values
      2. Storing text
        1. Understanding verbatim strings
      3. Storing numbers
        1. Storing whole numbers
        2. Storing real numbers
        3. Writing code to explore number sizes
        4. Comparing double and decimal types
      4. Storing Booleans
      5. Using Visual Studio Code workspaces
      6. Storing any type of object
      7. Storing dynamic types
      8. Declaring local variables
        1. Specifying and inferring the type of a local variable
      9. Getting default values for types
      10. Storing multiple values
    4. Working with null values
      1. Making a value type nullable
        1. Understanding nullable reference types
      2. Enabling nullable and non-nullable reference types
      3. Declaring non-nullable variables and parameters
      4. Checking for null
    5. Exploring console applications further
      1. Displaying output to the user
        1. Formatting using numbered positional arguments
        2. Formatting using interpolated strings
      2. Understanding format strings
      3. Getting text input from the user
      4. Importing a namespace
      5. Simplifying the usage of the console
      6. Getting key input from the user
      7. Getting arguments
      8. Setting options with arguments
      9. Handling platforms that do not support an API
    6. Practicing and exploring
      1. Exercise 2.1 – Test your knowledge
      2. Exercise 2.2 – Practice number sizes and ranges
      3. Exercise 2.3 – Explore topics
    7. Summary
  3. Controlling Flow and Converting Types
    1. Operating on variables
      1. Unary operators
      2. Binary arithmetic operators
      3. Assignment operators
      4. Logical operators
      5. Conditional logical operators
      6. Bitwise and binary shift operators
      7. Miscellaneous operators
    2. Understanding selection statements
      1. Branching with the if statement
      2. Why you should always use braces with if statements
      3. Pattern matching with the if statement
      4. Branching with the switch statement
      5. Pattern matching with the switch statement
      6. Simplifying switch statements with switch expressions
    3. Understanding iteration statements
      1. Looping with the while statement
      2. Looping with the do statement
      3. Looping with the for statement
      4. Looping with the foreach statement
        1. Understanding how foreach works internally
    4. Casting and converting between types
      1. Casting numbers implicitly and explicitly
      2. Converting with the System.Convert type
      3. Rounding numbers
        1. Understanding the default rounding rules
        2. Taking control of rounding rules
      4. Converting from any type to a string
      5. Converting from a binary object to a string
      6. Parsing from strings to numbers or dates and times
        1. Avoiding exceptions using the TryParse method
      7. Handling exceptions when converting types
        1. Wrapping error-prone code in a try block
        2. Catching all exceptions
        3. Catching specific exceptions
      8. Checking for overflow
        1. Throwing overflow exceptions with the checked statement
        2. Disabling compiler overflow checks with the unchecked statement
    5. Practicing and exploring
      1. Exercise 3.1 – Test your knowledge
      2. Exercise 3.2 – Explore loops and overflow
      3. Exercise 3.3 – Practice loops and operators
      4. Exercise 3.4 – Practice exception handling
      5. Exercise 3.5 – Test your knowledge of operators
      6. Exercise 3.6 – Explore topics
    6. Summary
  4. Writing, Debugging, and Testing Functions
    1. Writing functions
      1. Writing a times table function
      2. Writing a function that returns a value
      3. Writing mathematical functions
        1. Converting numbers from ordinal to cardinal
        2. Calculating factorials with recursion
      4. Documenting functions with XML comments
    2. Debugging during development
      1. Creating code with a deliberate bug
      2. Setting a breakpoint
      3. Navigating with the debugging toolbar
      4. Debugging windows
      5. Stepping through code
      6. Customizing breakpoints
    3. Logging during development and runtime
      1. Instrumenting with Debug and Trace
      2. Writing to the default trace listener
      3. Configuring trace listeners
      4. Switching trace levels
    4. Unit testing functions
      1. Creating a class library that needs testing
      2. Writing unit tests
      3. Running unit tests
    5. Practicing and exploring
      1. Exercise 4.1 – Test your knowledge
      2. Exercise 4.2 – Practice writing functions with debugging and unit testing
      3. Exercise 4.3 – Explore topics
    6. Summary
  5. Building Your Own Types with Object-Oriented Programming
    1. Talking about object-oriented programming
    2. Building class libraries
      1. Creating a class library
        1. Defining a class
        2. Understanding members
      2. Instantiating a class
        1. Referencing an assembly
        2. Importing a namespace to use a type
      3. Managing multiple files
      4. Understanding objects
        1. Inheriting from System.Object
    3. Storing data within fields
      1. Defining fields
      2. Understanding access modifiers
      3. Setting and outputting field values
      4. Storing a value using an enum type
      5. Storing multiple values using an enum type
      6. Storing multiple values using collections
      7. Making a field static
      8. Making a field constant
      9. Making a field read-only
      10. Initializing fields with constructors
      11. Setting fields with default literals
    4. Writing and calling methods
      1. Returning values from methods
      2. Combining multiple returned values using tuples
        1. Naming the fields of a tuple
        2. Inferring tuple names
        3. Deconstructing tuples
      3. Defining and passing parameters to methods
      4. Overloading methods
      5. Passing optional parameters and naming arguments
      6. Controlling how parameters are passed
      7. Splitting classes using partial
    5. Controlling access with properties and indexers
      1. Defining readonly properties
      2. Defining settable properties
      3. Defining indexers
    6. Practicing and exploring
      1. Exercise 5.1 – Test your knowledge
      2. Exercise 5.2 – Explore topics
    7. Summary
  6. Implementing Interfaces and Inheriting Classes
    1. Setting up a class library and console application
    2. Simplifying methods
      1. Implementing functionality using methods
      2. Implementing functionality using operators
      3. Implementing functionality using local functions
    3. Raising and handling events
      1. Calling methods using delegates
      2. Defining and handling delegates
      3. Defining and handling events
    4. Implementing interfaces
      1. Common interfaces
      2. Comparing objects when sorting
      3. Comparing objects using a separate class
      4. Defining interfaces with default implementations
    5. Making types safely reusable with generics
      1. Working with generic types
      2. Working with generic methods
    6. Managing memory with reference and value types
      1. Working with struct types
      2. Releasing unmanaged resources
      3. Ensuring that Dispose is called
    7. Inheriting from classes
      1. Extending classes
      2. Hiding members
      3. Overriding members
      4. Preventing inheritance and overriding
      5. Understanding polymorphism
    8. Casting within inheritance hierarchies
      1. Implicit casting
      2. Explicit casting
      3. Avoiding casting exceptions
    9. Inheriting and extending .NET types
      1. Inheriting exceptions
      2. Extending types when you can't inherit
        1. Using static methods to reuse functionality
        2. Using extension methods to reuse functionality
    10. Practicing and exploring
      1. Exercise 6.1 – Test your knowledge
      2. Exercise 6.2 – Practice creating an inheritance hierarchy
      3. Exercise 6.3 – Explore topics
    11. Summary
  7. Understanding and Packaging .NET Types
    1. Introducing .NET Core 3.0
      1. .NET Core 1.0
      2. .NET Core 1.1
      3. .NET Core 2.0
      4. .NET Core 2.1
      5. .NET Core 2.2
      6. .NET Core 3.0
    2. Understanding .NET Core components
      1. Understanding assemblies, packages, and namespaces
        1. Understanding dependent assemblies
        2. Understanding the Microsoft .NET Core App platform
        3. Understanding NuGet packages
        4. Understanding frameworks
      2. Importing a namespace to use a type
      3. Relating C# keywords to .NET types
      4. Sharing code cross-platform with .NET Standard class libraries
    3. Publishing your applications for deployment
      1. Creating a console application to publish
      2. Understanding dotnet commands
        1. Creating new projects
        2. Managing projects
      3. Publishing a self-contained app
    4. Decompiling assemblies
    5. Packaging your libraries for NuGet distribution
      1. Referencing a NuGet package
        1. Fixing dependencies
      2. Packaging a library for NuGet
      3. Testing your package
    6. Porting from .NET Framework to .NET Core
      1. Could you port?
      2. Should you port?
      3. Differences between .NET Framework and .NET Core
      4. Understanding the .NET Portability Analyzer
      5. Using non-.NET Standard libraries
    7. Practicing and exploring
      1. Exercise 7.1 – Test your knowledge
      2. Exercise 7.2 – Explore topics
    8. Summary
  8. Working with Common .NET Types
    1. Working with numbers
      1. Working with big integers
      2. Working with complex numbers
    2. Working with text
      1. Getting the length of a string
      2. Getting the characters of a string
      3. Splitting a string
      4. Getting part of a string
      5. Checking a string for content
      6. Joining, formatting, and other string members
      7. Building strings efficiently
    3. Pattern matching with regular expressions
      1. Checking for digits entered as text
      2. Understanding the syntax of a regular expression
      3. Examples of regular expressions
      4. Splitting a complex comma-separated string
    4. Storing multiple objects in collections
      1. Common features of all collections
      2. Understanding collection choices
        1. Lists
        2. Dictionaries
        3. Stacks
        4. Queues
        5. Sets
      3. Working with lists
      4. Working with dictionaries
      5. Sorting collections
      6. Using specialized collections
      7. Using immutable collections
    5. Working with spans, indexes, and ranges
      1. Using memory efficiently using spans
      2. Identifying positions with the Index type
      3. Identifying ranges with the Range type
      4. Using indexes and ranges
    6. Working with network resources
      1. Working with URIs, DNS, and IP addresses
      2. Pinging a server
    7. Working with types and attributes
      1. Versioning of assemblies
      2. Reading assembly metadata
      3. Creating custom attributes
      4. Doing more with reflection
    8. Internationalizing your code
    9. Practicing and exploring
      1. Exercise 8.1 – Test your knowledge
      2. Exercise 8.2 – Practice regular expressions
      3. Exercise 8.3 – Practice writing extension methods
      4. Exercise 8.4 – Explore topics
    10. Summary
  9. Working with Files, Streams, and Serialization
    1. Managing the filesystem
      1. Handling cross-platform environments and filesystems
      2. Managing drives
      3. Managing directories
      4. Managing files
      5. Managing paths
      6. Getting file information
      7. Controlling how you work with files
    2. Reading and writing with streams
      1. Writing to text streams
      2. Writing to XML streams
      3. Disposing of file resources
      4. Compressing streams
      5. Compressing with the Brotli algorithm
      6. High-performance streams using pipelines
      7. Asynchronous streams
    3. Encoding and decoding text
      1. Encoding strings as byte arrays
      2. Encoding and decoding text in files
    4. Serializing object graphs
      1. Serializing as XML
      2. Generating compact XML
      3. Deserializing XML files
      4. Serializing with JSON
      5. High-performance JSON processing
    5. Practicing and exploring
      1. Exercise 9.1 – Test your knowledge
      2. Exercise 9.2 – Practice serializing as XML
      3. Exercise 9.3 – Explore topics
    6. Summary
  10. Protecting Your Data and Applications
    1. Understanding the vocabulary of protection
      1. Keys and key sizes
      2. IVs and block sizes
      3. Salts
      4. Generating keys and IVs
    2. Encrypting and decrypting data
      1. Encrypting symmetrically with AES
    3. Hashing data
      1. Hashing with the commonly used SHA256
    4. Signing data
      1. Signing with SHA256 and RSA
    5. Generating random numbers
      1. Generating random numbers for games
      2. Generating random numbers for cryptography
    6. What's new in cryptography
    7. Authenticating and authorizing users
      1. Implementing authentication and authorization
      2. Protecting application functionality
    8. Practicing and exploring
      1. Exercise 10.1 – Test your knowledge
      2. Exercise 10.2 – Practice protecting data with encryption and hashing
      3. Exercise 10.3 – Practice protecting data with decryption
      4. Exercise 10.4 – Explore topics
    9. Summary
  11. Working with Databases Using Entity Framework Core
    1. Understanding modern databases
      1. Understanding Entity Framework
      2. Using a sample relational database
        1. Setting up SQLite for macOS
        2. Setting up SQLite for Windows
      3. Creating the Northwind sample database for SQLite
      4. Managing the Northwind sample database with SQLiteStudio
    2. Setting up EF Core
      1. Choosing an EF Core data provider
      2. Connecting to the database
    3. Defining EF Core models
      1. EF Core conventions
      2. EF Core annotation attributes
      3. EF Core Fluent API
      4. Understanding data seeding
      5. Building an EF Core model
        1. Defining the Category and Product entity classes
        2. Defining the Northwind database context class
    4. Querying EF Core models
      1. Filtering and sorting products
      2. Logging EF Core
      3. Logging with query tags
      4. Pattern matching with Like
      5. Defining global filters
    5. Loading patterns with EF Core
      1. Eager loading entities
      2. Enabling lazy loading
      3. Explicit loading entities
    6. Manipulating data with EF Core
      1. Inserting entities
      2. Updating entities
      3. Deleting entities
      4. Pooling database contexts
      5. Transactions
      6. Defining an explicit transaction
    7. Practicing and exploring
      1. Exercise 11.1 – Test your knowledge
      2. Exercise 11.2 – Practice exporting data using different serialization formats
      3. Exercise 11.3 – Explore the EF Core documentation
    8. Summary
  12. Querying and Manipulating Data Using LINQ
    1. Writing LINQ queries
      1. Extending sequences with the Enumerable class
      2. Filtering entities with Where
        1. Targeting a named method
        2. Simplifying the code by removing the explicit delegate instantiation
        3. Targeting a lambda expression
      3. Sorting entities
        1. Sorting by a single property using OrderBy
        2. Sorting by a subsequent property using ThenBy
      4. Filtering by type
    2. Working with sets and bags using LINQ
    3. Using LINQ with EF Core
      1. Building an EF Core model
      2. Filtering and sorting sequences
      3. Projecting sequences into new types
      4. Joining and grouping sequences
      5. Aggregating sequences
    4. Sweetening LINQ syntax with syntactic sugar
    5. Using multiple threads with parallel LINQ
      1. Creating an app that benefits from multiple threads
        1. Using Windows 10
        2. Using macOS
        3. For all operating systems
    6. Creating your own LINQ extension methods
    7. Working with LINQ to XML
      1. Generating XML using LINQ to XML
      2. Reading XML using LINQ to XML
    8. Practicing and exploring
      1. Exercise 12.1 – Test your knowledge
      2. Exercise 12.2 – Practice querying with LINQ
      3. Exercise 12.3 – Explore topics
    9. Summary
  13. Improving Performance and Scalability Using Multitasking
    1. Understanding processes, threads, and tasks
    2. Monitoring performance and resource usage
      1. Evaluating the efficiency of types
      2. Monitoring performance and memory use
      3. Implementing the Recorder class
        1. Measuring the efficiency of processing strings
    3. Running tasks asynchronously
      1. Running multiple actions synchronously
      2. Running multiple actions asynchronously using tasks
      3. Waiting for tasks
      4. Continuing with another task
      5. Nested and child tasks
    4. Synchronizing access to shared resources
      1. Accessing a resource from multiple threads
      2. Applying a mutually exclusive lock to a resource
      3. Understanding the lock statement and avoiding deadlocks
      4. Making CPU operations atomic
      5. Applying other types of synchronization
    5. Understanding async and await
      1. Improving responsiveness for console apps
      2. Improving responsiveness for GUI apps
      3. Improving scalability for web applications and web services
      4. Common types that support multitasking
      5. Using await in catch blocks
      6. Working with async streams
    6. Practicing and exploring
      1. Exercise 13.1 – Test your knowledge
      2. Exercise 13.2 – Explore topics
    7. Summary
  14. Practical Applications of C# and .NET
    1. Understanding app models for C# and .NET
      1. Building websites using ASP.NET Core
      2. Building websites using a web content management system
      3. Understanding web applications
      4. Building and consuming web services
      5. Building intelligent apps
    2. New features for ASP.NET Core
      1. ASP.NET Core 1.0
      2. ASP.NET Core 1.1
      3. ASP.NET Core 2.0
      4. ASP.NET Core 2.1
      5. ASP.NET Core 2.2
      6. ASP.NET Core 3.0
    3. Understanding SignalR
    4. Understanding Blazor
      1. JavaScript and friends
      2. Silverlight – C# and .NET using a plugin
      3. WebAssembly – a target for Blazor
      4. Blazor on the server-side or client-side
    5. Understanding the bonus chapters
      1. Building Windows desktop apps
      2. Building cross-platform mobile apps
    6. Building an entity data model for Northwind
      1. Creating a class library for Northwind entity models
      2. Creating a class library for a Northwind database context
    7. Summary
  15. Building Websites Using ASP.NET Core Razor Pages
    1. Understanding web development
      1. Understanding HTTP
      2. Client-side web development
    2. Understanding ASP.NET Core
      1. Classic ASP.NET versus modern ASP.NET Core
      2. Creating an ASP.NET Core project
      3. Testing and securing the website
      4. Enabling static and default files
    3. Exploring Razor Pages
      1. Enabling Razor Pages
      2. Defining a Razor Page
      3. Using shared layouts with Razor Pages
      4. Using code-behind files with Razor Pages
    4. Using Entity Framework Core with ASP.NET Core
      1. Configure Entity Framework Core as a service
      2. Manipulating data using Razor pages
        1. Enabling a model to insert entities
        2. Defining a form to insert new suppliers
    5. Using Razor class libraries
      1. Using a Razor class library
    6. Practicing and exploring
      1. Exercise 15.1 – Test your knowledge
      2. Exercise 15.2 – Practice building a data-driven web page
      3. Exercise 15.3 – Explore topics
    7. Summary
  16. Building Websites Using the Model-View-Controller Pattern
    1. Setting up an ASP.NET Core MVC website
      1. Creating and exploring an ASP.NET Core MVC website
      2. Reviewing the ASP.NET Core MVC website
      3. Reviewing the ASP.NET Core Identity database
    2. Exploring an ASP.NET Core MVC website
      1. Understanding ASP.NET Core MVC startup
      2. Understanding the default MVC route
      3. Understanding controllers and actions
      4. Understanding filters
        1. Using a filter to secure an action method
        2. Using a filter to cache a response
        3. Using a filter to define a custom route
      5. Understanding entity and view models
      6. Understanding views
    3. Customizing an ASP.NET Core MVC website
      1. Defining a custom style
      2. Setting up the category images
      3. Understanding Razor syntax
      4. Defining a typed view
      5. Testing the customized home page
      6. Passing parameters using a route value
      7. Understanding model binders
      8. Validating the model
      9. Understanding view helper methods
      10. Querying a database and using display templates
      11. Improving scalability using asynchronous tasks
        1. Making controller action methods asynchronous
    4. Using other project templates
      1. Installing additional template packs
    5. Practicing and exploring
      1. Exercise 16.1 – Test your knowledge
      2. Exercise 16.2 – Practice implementing MVC by implementing a category detail page
      3. Exercise 16.3 – Practice improving scalability by understanding and implementing async action methods
      4. Exercise 16.4 – Explore topics
    6. Summary
  17. Building Websites Using a Content Management System
    1. Understanding the benefits of a CMS
      1. Understanding basic CMS features
      2. Understanding enterprise CMS features
      3. Understanding CMS platforms
    2. Understanding Piranha CMS
      1. Creating and exploring a Piranha CMS website
      2. Editing site and page content
      3. Creating a new top-level page
      4. Creating a new child page
      5. Reviewing the blog archive
      6. Exploring authentication and authorization
      7. Exploring configuration
      8. Testing the new content
      9. Understanding routing
      10. Understanding media
      11. Understanding the application service
      12. Understanding content types
        1. Understanding component types
        2. Understanding standard fields
        3. Reviewing some content types
      13. Understanding standard blocks
      14. Reviewing component types and standard blocks
    3. Defining components, content types, and templates
      1. Reviewing the standard page type
      2. Reviewing the blog archive page type
      3. Defining custom content and component types
        1. Creating custom regions
        2. Creating an entity data model
        3. Creating custom page types
        4. Creating custom view models
      4. Defining custom content templates for content types
      5. Configuring start up and importing from a database
    4. Testing the Northwind CMS website
      1. Uploading images and creating the catalog root
      2. Importing category and product content
      3. Managing catalog content
      4. Reviewing how Piranha stores content
    5. Practicing and exploring
      1. Exercise 17.1 – Test your knowledge
      2. Exercise 17.2 – Practice defining a block type for rendering YouTube videos
      3. Exercise 17.3 – Explore topics
    6. Summary
  18. Building and Consuming Web Services
    1. Building web services using ASP.NET Core Web API
      1. Understanding web service acronyms
      2. Creating an ASP.NET Core Web API project
      3. Reviewing the web service's functionality
      4. Creating a web service for the Northwind database
      5. Creating data repositories for entities
      6. Implementing a Web API controller
      7. Configuring the customers repository and Web API controller
      8. Specifying problem details
    2. Documenting and testing web services
      1. Testing GET requests using a browser
      2. Testing HTTP requests with REST Client extension
      3. Enabling Swagger
      4. Testing requests with Swagger UI
    3. Consuming services using HTTP clients
      1. Understanding HttpClient
      2. Configuring HTTP clients using HttpClientFactory
      3. Enabling Cross-Origin Resource Sharing
    4. Implementing advanced features
      1. Implementing Health Check API
      2. Implementing Open API analyzers and conventions
      3. Understanding endpoint routing
      4. Configuring endpoint routing
    5. Understanding other communication technologies
      1. Understanding Windows Communication Foundation (WCF)
      2. Understanding gRPC
    6. Practicing and exploring
      1. Exercise 18.1 – Test your knowledge
      2. Exercise 18.2 – Practice creating and deleting customers with HttpClient
      3. Exercise 18.3 – Explore topics
    7. Summary
  19. Building Intelligent Apps Using Machine Learning
    1. Understanding machine learning
      1. Understanding the machine learning life cycle
      2. Understanding datasets for training and testing
      3. Understanding machine learning tasks
      4. Understanding Microsoft Azure Machine Learning
    2. Understanding ML.NET
      1. Understanding Infer.NET
      2. Understanding ML.NET learning pipelines
      3. Understanding model training concepts
      4. Understanding missing values and key types
      5. Understanding features and labels
    3. Making product recommendations
      1. Problem analysis
      2. Data gathering and processing
      3. Creating the NorthwindML website project
        1. Creating the data and view models
        2. Implementing the controller
        3. Training the recommendation models
        4. Implementing a shopping cart with recommendations
      4. Testing the product recommendations website
    4. Practicing and exploring
      1. Exercise 19.1 – Test your knowledge
      2. Exercise 19.2 – Practice with samples
      3. Exercise 19.3 – Explore topics
    5. Summary
  20. Building Windows Desktop Apps
    1. Understanding legacy Windows application platforms
      1. Understanding .NET Core 3.0 support for legacy Windows platforms
      2. Installing Microsoft Visual Studio 2019 for Windows
      3. Working with Windows Forms
        1. Building a new Windows Forms application
        2. Reviewing a new Windows Forms application
        3. Migrating a legacy Windows Forms application
        4. Migrating a Windows Forms app
      4. Migrating WPF apps to .NET Core 3.0
      5. Migrating legacy apps using the Windows Compatibility Pack
    2. Understanding the modern Windows platform
      1. Understanding Universal Windows Platform
      2. Understanding Fluent Design System
        1. Filling user interface elements with acrylic brushes
        2. Connecting user interface elements with animations
        3. Parallax views and Reveal lighting
      3. Understanding XAML Standard
        1. Simplifying code using XAML
        2. Choosing common controls
        3. Understanding markup extensions
    3. Creating a modern Windows app
      1. Enabling developer mode
      2. Creating a UWP project
      3. Exploring common controls and acrylic brushes
      4. Exploring Reveal
      5. Installing more controls
    4. Using resources and templates
      1. Sharing resources
      2. Replacing a control template
    5. Using data binding
      1. Binding to elements
      2. Creating an HTTP service to bind to
        1. Downloading the web service's certificate
      3. Binding to data from a secure HTTP service
      4. Creating the user interface to call the HTTP service
      5. Converting numbers to images
      6. Testing the HTTP service data binding
    6. Practicing and exploring
      1. Exercise 20.1 – Test your knowledge
      2. Exercise 20.2 – Explore topics
    7. Summary
  21. Building Cross-Platform Mobile Apps Using Xamarin.Forms
    1. Understanding Xamarin and Xamarin.Forms
      1. How Xamarin.Forms extends Xamarin
      2. Mobile first, cloud first
      3. Understanding additional functionality
        1. Understanding the INotificationPropertyChanged interface
        2. Understanding dependency services
      4. Understanding Xamarin.Forms user interface components
        1. Understanding the ContentPage view
        2. Understanding the Entry and Editor controls
        3. Understanding the ListView control
    2. Building mobile apps using Xamarin.Forms
      1. Adding Android SDKs
      2. Creating a Xamarin.Forms solution
      3. Creating an entity model with two-way data binding
      4. Creating a component for dialing phone numbers
      5. Creating views for the customers list and customer details
        1. Implementing the customer list view
        2. Implementing the customer detail view
        3. Setting the main page for the mobile app
      6. Testing the mobile app
    3. Consuming a web service from a mobile app
      1. Configuring the web service to allow insecure requests
      2. Configuring the iOS app to allow insecure connections
      3. Adding NuGet packages for consuming a web service
      4. Getting customers from the web service
    4. Practicing and exploring
      1. Exercise 21.1 – Test your knowledge
      2. Exercise 21.2 - Explore topics
    5. Summary
    6. Epilogue

Product information

  • Title: C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development - Fourth Edition
  • Author(s): Mark J. Price
  • Release date: October 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781788478120