O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development - Third Edition

Book Description

C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development, Third Edition is a practical guide to creating powerful cross-platform applications with C# 7 and .NET Core 2.0.

About This Book

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

Who This Book Is For

This book is targeted towards readers who have some prior programming experience or have a science, technology, engineering, or mathematics (STEM) background, and want to gain a solid foundation with C# and to be introduced to the types of applications they could build and will work cross-platform on Windows, Linux, and macOS.

What You Will Learn

  • Build cross-platform applications using C# 7.1 and .NET Core 2.0
  • Explore ASP.NET Core 2.0 and learn how to create professional websites, services, and applications
  • Improve your application's performance using multitasking
  • Use Entity Framework Core and LINQ to query and manipulate data
  • Master object-oriented programming with C# to increase code reuse and efficiency
  • Familiarize yourself with cross-device app development using the Universal Windows Platform
  • Protect and manage your files and data with encryption, streams, and serialization
  • Get started with mobile app development using Xamarin.Forms
  • Preview the nullable reference type feature of C# 8

In Detail

C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development, Third Edition, is a practical guide to creating powerful cross-platform applications with C# 7.1 and .NET Core 2.0. It gives readers of any experience level a solid foundation in C# and .NET. The first part of the book runs you through the basics of C#, as well as debugging functions and object-oriented programming, before taking a quick tour through the latest features of C# 7.1 such as default literals, tuples, inferred tuple names, pattern matching, out variables, and more.

After quickly taking you through C# and how .NET works, this book dives into the .NET Standard 2.0 class libraries, covering topics such as packaging and deploying your own libraries, and using common libraries for working with collections, performance, monitoring, serialization, files, databases, and encryption. The final section of the book demonstrates the major types of application that you can build and deploy cross-device and cross-platform. In this section, you'll learn about websites, web applications, web services, Universal Windows Platform (UWP) apps, and mobile apps. By the end of the book, you'll be armed with all the knowledge you need to build modern, cross-platform applications using C# and .NET.

Style and approach

This book takes a step-by-step approach and is filled with exciting projects and fascinating theory. It uses three high-impact sections to equip you with all the tools you’ll need to build modern, cross-platform applications using C# and .NET Core 2.0.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Preface
    1. What this book covers
      1. Part 1 – C# 7.1
      2. Part 2 – .NET Core 2.0 and .NET Standard 2.0
      3. Part 3 – App Models
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code
      2. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  2. Hello, C#! Welcome, .NET Core!
    1. Setting up your development environment
      1. Using alternative C# IDEs
      2. Deploying cross-platform
      3. Installing Microsoft Visual Studio 2017
        1. Choosing workloads
        2. Choosing additional components
      4. Installing Microsoft Visual Studio Code
        1. Installing Microsoft Visual Studio Code for macOS
        2. Installing .NET Core SDK for macOS
        3. Installing Node Package Manager for macOS
        4. Installing the Visual Studio Code extension for C#
      5. Installing Visual Studio for Mac
        1. Installing Xcode
        2. Downloading and installing Visual Studio for Mac
    2. Understanding .NET
      1. Understanding .NET Framework
      2. Understanding the Mono and Xamarin projects
      3. Understanding .NET Core
      4. Understanding .NET Standard
      5. Understanding .NET Native
      6. Comparing .NET technologies
    3. Writing and compiling code using the .NET Core CLI tool
      1. Writing code using a simple text editor
        1. If you are using Windows Notepad
        2. If you are using macOS TextEdit
      2. Creating and compiling apps using the .NET Core CLI tool
        1. Creating a console application at Command Prompt
        2. Restoring packages, compiling code, and running the application
      3. Fixing compiler errors
      4. Understanding intermediate language
    4. Writing and compiling code using Visual Studio 2017
      1. Writing code using Microsoft Visual Studio 2017
      2. Compiling code using Visual Studio 2017
      3. Fixing mistakes with the error list
      4. Adding existing projects to Visual Studio 2017
      5. Autoformatting code
      6. Experimenting with C# Interactive
      7. Other useful windows
    5. Writing and compiling code using Visual Studio Code
      1. Writing code using Visual Studio Code
      2. Compiling code using Visual Studio Code
      3. Autoformatting code
    6. Writing and compiling code using Visual Studio for Mac
      1. Next steps
    7. Managing source code with GitHub
      1. Using Git with Visual Studio 2017
        1. Using the Team Explorer window
        2. Cloning a GitHub repository
        3. Managing a GitHub repository
      2. Using Git with Visual Studio Code
        1. Configuring Git at the command line
        2. Managing Git with Visual Studio Code
    8. Practicing and exploring
      1. Exercise 1.1 – Test your knowledge
      2. Exercise 1.2 – Practice C# anywhere
      3. Exercise 1.3 – Explore topics
    9. Summary
  3. Part 1, C# 7.1
  4. Speaking C#
    1. Understanding C# basics
      1. Using Visual Studio 2017
      2. Using Visual Studio Code on macOS, Linux, or Windows
      3. C# grammar
        1. Statements
        2. Comments
        3. Blocks
      4. C# vocabulary
      5. Help for writing correct code
      6. Verbs are methods
      7. Nouns are types, fields, and variables
      8. Revealing the extent of the C# vocabulary
        1. Building and running with Visual Studio 2017
        2. Building and running with Visual Studio Code
        3. Adding more types with Visual Studio 2017 and Visual Studio Code
    2. Declaring variables
      1. Naming variables
      2. Literal values
      3. Storing text
      4. Storing numbers
        1. Storing whole numbers
        2. C# 7 improvements
        3. Storing real numbers
          1. Using Visual Studio 2017
          2. Using Visual Studio Code
        4. Writing code to explore numbers
          1. Comparing double and decimal types
      5. Storing Booleans
      6. The object type
      7. The dynamic type
      8. Local variables
        1. Specifying the type of a local variable
        2. Inferring the type of a local variable
      9. Making a value type nullable
      10. Understanding nullable reference types
        1. The billion-dollar mistake
        2. Changing the defaults for nullable types in C# 8.0
        3. Checking for null
      11. Storing multiple values in an array
    3. Exploring console applications further
      1. Displaying output to the user
      2. Getting input from the user
      3. Importing a namespace
      4. Simplifying the usage of the console
      5. Reading arguments and working with arrays
        1. Passing arguments with Visual Studio 2017
        2. Passing arguments with Visual Studio Code
        3. Viewing the output
        4. Enumerating arguments
          1. Running on Windows
          2. Running on macOS
        5. Handling platforms that do not support an API
    4. Operating on variables
      1. Experimenting with unary operators
      2. Experimenting with arithmetic operators
      3. Comparison and Boolean operators
    5. 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
    6. Summary
  5. Controlling the Flow and Converting Types
    1. Selection statements
      1. Using Visual Studio 2017
      2. Using Visual Studio Code on macOS, Linux, or Windows
      3. The if statement
        1. The code
        2. Pattern matching with the if statement
      4. The switch statement
        1. The code
        2. Pattern matching with the switch statement
    2. Iteration statements
      1. The while statement
      2. The do statement
      3. The for statement
      4. The foreach statement
    3. Casting and converting between types
      1. Casting from numbers to numbers
        1. Casting numbers implicitly
        2. Casting numbers explicitly
      2. Using the convert type
      3. Rounding numbers
      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
    4. Handling exceptions when converting types
      1. The try statement
      2. Catching all exceptions
      3. Catching specific exceptions
    5. Checking for overflow
      1. The checked statement
      2. The unchecked statement
    6. Looking for help
      1. Microsoft Docs and MSDN
      2. Go to definition
      3. Stack Overflow
      4. Google
      5. Subscribing to blogs
      6. Design patterns
        1. Singleton pattern
    7. 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 – Explore topics
    8. Summary
  6. 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. Formatting numbers for output
        2. Calculating factorials with recursion
    2. Debugging an application during development
      1. Creating an application with a deliberate bug
      2. Setting a breakpoint
      3. 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
        1. Writing to the default trace listener
        2. Configuring trace listeners
      2. Switching trace levels
    4. Unit testing functions
      1. Creating a class library that needs testing with Visual Studio 2017
      2. Creating a unit test project with Visual Studio 2017
      3. Creating a class library that needs testing with Visual Studio Code
      4. Writing unit tests
      5. Running unit tests with Visual Studio 2017
      6. Running unit tests with Visual Studio Code
    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
  7. Building Your Own Types with Object-Oriented Programming
    1. Talking about OOP
    2. Building class libraries
      1. Creating a class library with Visual Studio 2017
      2. Creating a class library with Visual Studio Code
      3. Defining a class
      4. Instantiating a class
        1. Referencing an assembly using Visual Studio 2017
        2. Referencing an assembly using Visual Studio Code
        3. Importing a namespace
      5. Managing multiple projects with Visual Studio Code
      6. Inheriting from System.Object
    3. Storing data with fields
      1. Defining fields
        1. Understanding access modifiers
      2. Storing a value using the enum keyword
      3. Storing multiple values using collections
      4. Making a field static
      5. Making a field constant
      6. Making a field read-only
      7. Initializing fields with constructors
      8. Setting fields with default literal
    4. Writing and calling methods
      1. Combining multiple values with tuples
        1. Defining methods with tuples
        2. Naming the fields of a tuple
        3. Inferring tuple names
        4. Deconstructing tuples
      2. Defining and passing parameters to methods
      3. Overloading methods
      4. Optional parameters and named arguments
    5. Controlling how parameters are passed
    6. Splitting classes using partial
    7. Controlling access with properties and indexers
      1. Defining read-only properties
      2. Defining settable properties
      3. Defining indexers
    8. Practicing and exploring
      1. Exercise 5.1 – Test your knowledge
      2. Exercise 5.2 – Explore topics
    9. Summary
  8. Implementing Interfaces and Inheriting Classes
    1. Setting up a class library and console application
      1. Using Visual Studio 2017
      2. Using Visual Studio Code
      3. Defining the classes
    2. Simplifying methods with operators
      1. Implementing some functionality with a method
      2. Implementing some functionality with an operator
    3. Defining local functions
    4. Raising and handling events
      1. Calling methods using delegates
      2. Defining events
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 or Visual Studio Code
    5. Implementing interfaces
      1. Common interfaces
      2. Comparing objects when sorting
        1. Attempting to sort objects without a method to compare
        2. Defining a method to compare
        3. Defining a separate comparer
    6. Making types more reusable with generics
      1. Making a generic type
      2. Making a generic method
    7. Managing memory with reference and value types
      1. Defining a struct type
      2. Releasing unmanaged resources
      3. Ensuring that dispose is called
    8. Inheriting from classes
      1. Extending classes
      2. Hiding members
      3. Overriding members
        1. Using Visual Studio 2017
        2. Using Visual Studio 2017 or Visual Studio Code
      4. Preventing inheritance and overriding
      5. Polymorphism
    9. Casting within inheritance hierarchies
      1. Implicit casting
      2. Explicit casting
      3. Handling casting exceptions
    10. Inheriting and extending .NET types
      1. Inheriting from an exception
      2. Extending types when you can't inherit
        1. Using static methods to reuse functionality
        2. Using extension methods to reuse functionality
    11. 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
    12. Summary
  9. Part 2 – .NET Core 2.0 and .NET Standard 2.0
  10. Understanding and Packaging .NET Standard Types
    1. Understanding assemblies and namespaces
      1. Base Class Libraries and CoreFX
        1. Assemblies, NuGet packages, and platforms
        2. Namespaces
      2. Understanding dependent assemblies
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 and Visual Studio Code
      3. Relating assemblies and namespaces
        1. Browsing assemblies with Visual Studio 2017
        2. Using Visual Studio 2017 or Visual Studio Code
        3. Importing a namespace
      4. Relating C# keywords to .NET types
    2. Sharing code cross-platform with .NET Standard 2.0 class libraries
      1. Creating a .NET Standard 2.0 class library
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
    3. Understanding NuGet packages
      1. Understanding metapackages
      2. Understanding frameworks
      3. Fixing dependencies
    4. Publishing your applications for deployment
      1. Creating a console application to publish
      2. Publishing with Visual Studio 2017 on Windows
      3. Publishing with Visual Studio Code on macOS
    5. Packaging your libraries for NuGet distribution
      1. Understanding dotnet commands
      2. Adding a package reference
        1. Using Visual Studio Code
        2. Using Visual Studio 2017
      3. Packaging a library for NuGet
      4. Testing your package
        1. Using Visual Studio Code
        2. Using Visual Studio 2017
        3. Using Visual Studio 2017 and Visual Studio Code
    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
  11. Using Common .NET Standard 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. Other string members
      7. Building strings efficiently
      8. Pattern matching with regular expressions
        1. The syntax of a regular expression
        2. Examples of regular expressions
    3. Working with collections
      1. Common features of all collections
      2. Understanding collections
        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
    4. Working with network resources
      1. Working with URIs, DNS, and IP addresses
      2. Pinging a server
    5. Working with types and attributes
      1. Versioning of assemblies
      2. Reading assembly metadata
      3. Creating custom attributes
      4. Doing more with reflection
    6. Internationalizing your code
      1. Globalizing an application
    7. 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
    8. Summary
  12. Working with Files, Streams, and Serialization
    1. Managing the filesystem
      1. Handling cross-platform environments and filesystems
        1. Using Windows 10
        2. Using macOS
      2. Managing drives
      3. Managing directories
      4. Managing files
      5. Managing paths
      6. Getting file information
      7. Controlling files
    2. Reading and writing with streams
      1. Writing to text and XML streams
        1. Writing to text streams
        2. Writing to XML streams
      2. Disposing of file resources
        1. Implementing disposal with try statement
        2. Simplifying disposal with the using statement
      3. Compressing streams
    3. Encoding text
      1. Encoding strings as byte arrays
      2. Encoding and decoding text in files
    4. Serializing object graphs
      1. Serializing with XML
      2. Deserializing with XML
      3. Customizing the XML
      4. Serializing with JSON
      5. Serializing with other formats
    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
  13. 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
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Creating the Protector class
    3. Hashing data
      1. Hashing with the commonly used SHA256
    4. Signing data
      1. Signing with SHA256 and RSA
      2. Testing the signing and validating
    5. Generating random numbers
      1. Generating random numbers for games
      2. Generating random numbers for cryptography
      3. Testing the random key or IV generation
    6. Authenticating and authorizing users
      1. Implementing authentication and authorization
      2. Testing authentication and authorization
      3. Protecting application functionality
    7. 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
    8. Summary
  14. Working with Databases Using Entity Framework Core
    1. Understanding modern databases
      1. Using a sample relational database
      2. Using Microsoft SQL Server
        1. Connecting to SQL Server
        2. Creating the Northwind sample database for SQL Server
        3. Managing the Northwind sample database with Server Explorer
      3. Using SQLite
        1. Creating the Northwind sample database for SQLite
        2. Managing the Northwind sample database with SQLiteStudio
    2. Setting up Entity Framework Core
      1. Choosing an EF Core data provider
      2. Connecting to the database
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
    3. Defining Entity Framework Core models
      1. EF Core conventions
      2. EF Core annotation attributes
      3. EF Core Fluent API
      4. Building an EF Core model
        1. Defining the Category entity class
        2. Defining the Product entity class
        3. Defining the Northwind database context class
    4. Querying an EF Core model
      1. Logging EF Core
      2. Pattern matching with Like
      3. Defining global filters
      4. Loading patterns with EF Core
        1. Eager and lazy loading entities
        2. Explicit loading entities
    5. 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
    6. 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
    7. Summary
  15. 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
    3. Using LINQ with EF Core
      1. Projecting entities with Select
      2. Building an EF Core model
      3. Joining and grouping
      4. Aggregating sequences
    4. Sweetening the syntax with syntactic sugar
    5. Using multiple threads with parallel LINQ
    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
  16. Improving Performance and Scalability Using Multitasking
    1. Monitoring performance and resource usage
      1. Evaluating the efficiency of types
      2. Monitoring performance and memory use
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Creating the Recorder class
        4. Measuring the efficiency of processing strings
    2. Understanding processes, threads, and tasks
    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
      4. Making 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. await in catch blocks
    6. Practicing and exploring
      1. Exercise 13.1 – Test your knowledge
      2. Exercise 13.2 – Explore topics
    7. Summary
  17. Part 3 – App Models
  18. Building Web Sites 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 with Visual Studio 2017
      3. Creating an ASP.NET Core project with Visual Studio Code
      4. Reviewing the ASP.NET Core Empty project template
      5. Testing the empty website
      6. Enabling static files
      7. Enabling default files
    3. Exploring Razor Pages
      1. Enabling Razor Pages
      2. Defining a Razor Page
      3. Using shared layouts with Razor Pages
        1. Setting a shared layout
        2. Defining a shared layout
      4. Using code-behind files with Razor Pages
    4. Using Entity Framework Core with ASP.NET Core
      1. Creating Entity models for Northwind
        1. Creating a class library for the Northwind entity classes
        2. Defining the entity classes
        3. Creating a class library for Northwind database context
          1. Using Visual Studio 2017
          2. Using Visual Studio Code
        4. Defining the database context class
      2. Creating the Northwind database in the website
      3. Configure Entity Framework Core as a service
      4. Manipulating data
    5. Practicing and exploring
      1. Exercise 14.1 – Practice building a data-driven website
      2. Exercise 14.2 – Explore topics
    6. Summary
  19. Building Web Sites Using ASP.NET Core MVC
    1. Setting up an ASP.NET Core MVC website
      1. Creating an ASP.NET Core MVC website
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
      2. Reviewing the ASP.NET Core MVC project template
      3. Performing database migrations
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
      4. Testing the ASP.NET MVC website
      5. Reviewing authentication with ASP.NET Identity
    2. Understanding an ASP.NET Core MVC website
      1. ASP.NET Core startup
      2. Understanding the default route
      3. Understanding ASP.NET Core MVC controllers
      4. Understanding ASP.NET Core MVC models
        1. Configuring an EF Core entity data model
        2. Creating view models for requests
        3. Fetch the model in the controller
      5. Understanding ASP.NET Core MVC views
        1. Rendering the Home controller's views
        2. Sharing layouts between views
        3. Defining custom styles
        4. Defining a typed view
      6. Passing parameters using a route value
      7. Passing parameters using a query string
    3. Practicing and exploring
      1. Exercise 15.1 – Practice improving scalability by understanding and implementing async action methods
      2. Exercise 15.2 – Explore topics
    4. Summary
  20. Building Web Services and Applications Using ASP.NET Core
    1. Building web services using ASP.NET Core Web API
      1. Understanding ASP.NET Core controllers
      2. Creating an ASP.NET Core Web API project
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 and Visual Studio Code
      3. Creating a web service for the Northwind database
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 and Visual Studio Code
      4. Creating data repositories for entities
        1. Configuring and registering the customers repository
        2. Creating the Web API controller
    2. Documenting and testing web services using Swagger
      1. Testing GET requests with any browser
      2. Testing POST, PUT, and DELETE requests with Swagger
      3. Installing a Swagger package
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 and Visual Studio Code
      4. Testing GET requests with Swagger UI
      5. Testing POST requests with Swagger UI
    3. Building SPAs using Angular
      1. Understanding the Angular project template
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 and Visual Studio Code
      2. Calling NorthwindService
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 and Visual Studio Code
        4. Modifying the home component to call NorthwindService
      3. Testing the Angular component calling the service
        1. Using Visual Studio 2017
        2. Using Visual Studio Code
        3. Using Visual Studio 2017 and Visual Studio Code
    4. Using other project templates
      1. Installing additional template packs
    5. Practicing and exploring
      1. Exercise 16.1 – Practice with React and Redux
      2. Exercise 16.2 – Explore topics
    6. Summary
  21. Building Windows Apps Using XAML and Fluent Design
    1. 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.0
        1. Simplifying code using XAML
        2. Choosing common controls
    2. 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
    3. Using resources and templates
      1. Sharing resources
      2. Replacing a control template
    4. Data binding
      1. Binding to elements
      2. Binding to data sources
        1. Modifying the NorthwindService
        2. Creating the Northwind app
    5. Building apps using Windows Template Studio
      1. Installing Windows Template Studio
      2. Selecting project types, frameworks, pages, and features
      3. Retargeting the project
      4. Customizing some views
      5. Testing the app's functionality
    6. Practicing and exploring
      1. Exercise 17.1 – Explore topics
    7. Summary
  22. Building Mobile Apps Using XAML and Xamarin.Forms
    1. Understanding Xamarin and Xamarin.Forms
      1. How Xamarin.Forms extends Xamarin
      2. Mobile first, cloud first
    2. Building mobile apps using Xamarin.Forms
      1. Adding Android SDKs
      2. Creating a Xamarin.Forms solution
      3. Creating a model
      4. Creating an interface for dialing phone numbers
        1. Implement the phone dialer for iOS
        2. Implement the phone dialer for Android
      5. Creating views for the customers list and customer details
        1. Creating the view for the list of customers
        2. Creating the view for the customer details
      6. Testing the mobile app with iOS
      7. Adding NuGet packages for calling a REST service
      8. Getting customers from the service
    3. Practicing and exploring
      1. Exercise 18.1 - Explore topics
    4. Summary
  23. Summary
    1. Good luck!
  24. Answers to the Test Your Knowledge Questions
    1. Chapter 1 – Hello, C#! Welcome, .NET Core!
    2. Chapter 2 – Speaking C#
    3. Chapter 3 – Controlling the Flow and Converting Types
    4. Chapter 4 – Writing, Debugging, and Testing Functions
    5. Chapter 5 – Building Your Own Types with Object-Oriented Programming
    6. Chapter 6 – Implementing Interfaces and Inheriting Classes
    7. Chapter 7 – Understanding and Packaging .NET Standard Types
    8. Chapter 8 – Using Common .NET Standard Types
    9. Chapter 9 – Working with Files, Streams, and Serialization
    10. Chapter 10 – Protecting Your Data and Applications
    11. Chapter 11 – Working with Databases Using Entity Framework Core
    12. Chapter 12 – Querying and Manipulating Data Using LINQ
    13. Chapter 13 – Improving Performance and Scalability Using Multitasking