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
-
Hello, C#! Welcome, .NET!
-
Setting up your development environment
- Using Visual Studio Code for cross-platform development
- Using Visual Studio 2019 for Windows app development
- Using Visual Studio for Mac for mobile development
- Recommended tools for chapters
- Deploying cross-platform
- Understanding Microsoft Visual Studio Code versions
- Downloading and installing Visual Studio Code
- Installing other extensions
-
Understanding .NET
- Understanding the .NET Framework
- Understanding the Mono and Xamarin projects
- Understanding .NET Core
- Understanding future versions of .NET
- Understanding .NET Core support
- What is different about .NET Core?
- Understanding .NET Standard
- .NET platforms and tools used by the book editions
- Understanding intermediate language
- Understanding .NET Native
- Comparing .NET technologies
- Building console apps using Visual Studio Code
- Downloading solution code from a GitHub repository
- Looking for help
- Practicing and exploring
- Summary
-
Setting up your development environment
-
Speaking C#
- Introducing C#
- Understanding C# basics
- Working with variables
- Working with null values
- Exploring console applications further
- Practicing and exploring
- Summary
-
Controlling Flow and Converting Types
- Operating on variables
- Understanding selection statements
- Understanding iteration statements
- Casting and converting between types
- Practicing and exploring
- Summary
- Writing, Debugging, and Testing Functions
-
Building Your Own Types with Object-Oriented Programming
- Talking about object-oriented programming
- Building class libraries
-
Storing data within fields
- Defining fields
- Understanding access modifiers
- Setting and outputting field values
- Storing a value using an enum type
- Storing multiple values using an enum type
- Storing multiple values using collections
- Making a field static
- Making a field constant
- Making a field read-only
- Initializing fields with constructors
- Setting fields with default literals
- Writing and calling methods
- Controlling access with properties and indexers
- Practicing and exploring
- Summary
-
Implementing Interfaces and Inheriting Classes
- Setting up a class library and console application
- Simplifying methods
- Raising and handling events
- Implementing interfaces
- Making types safely reusable with generics
- Managing memory with reference and value types
- Inheriting from classes
- Casting within inheritance hierarchies
- Inheriting and extending .NET types
- Practicing and exploring
- Summary
-
Understanding and Packaging .NET Types
- Introducing .NET Core 3.0
- Understanding .NET Core components
- Publishing your applications for deployment
- Decompiling assemblies
- Packaging your libraries for NuGet distribution
- Porting from .NET Framework to .NET Core
- Practicing and exploring
- Summary
- Working with Common .NET Types
- Working with Files, Streams, and Serialization
- Protecting Your Data and Applications
- Working with Databases Using Entity Framework Core
-
Querying and Manipulating Data Using LINQ
- Writing LINQ queries
- Working with sets and bags using LINQ
- Using LINQ with EF Core
- Sweetening LINQ syntax with syntactic sugar
- Using multiple threads with parallel LINQ
- Creating your own LINQ extension methods
- Working with LINQ to XML
- Practicing and exploring
- Summary
- Improving Performance and Scalability Using Multitasking
- Practical Applications of C# and .NET
- Building Websites Using ASP.NET Core Razor Pages
-
Building Websites Using the Model-View-Controller Pattern
- Setting up an ASP.NET Core MVC website
- Exploring an ASP.NET Core MVC website
-
Customizing an ASP.NET Core MVC website
- Defining a custom style
- Setting up the category images
- Understanding Razor syntax
- Defining a typed view
- Testing the customized home page
- Passing parameters using a route value
- Understanding model binders
- Validating the model
- Understanding view helper methods
- Querying a database and using display templates
- Improving scalability using asynchronous tasks
- Using other project templates
- Practicing and exploring
- Summary
-
Building Websites Using a Content Management System
- Understanding the benefits of a CMS
-
Understanding Piranha CMS
- Creating and exploring a Piranha CMS website
- Editing site and page content
- Creating a new top-level page
- Creating a new child page
- Reviewing the blog archive
- Exploring authentication and authorization
- Exploring configuration
- Testing the new content
- Understanding routing
- Understanding media
- Understanding the application service
- Understanding content types
- Understanding standard blocks
- Reviewing component types and standard blocks
- Defining components, content types, and templates
- Testing the Northwind CMS website
- Practicing and exploring
- Summary
-
Building and Consuming Web Services
-
Building web services using ASP.NET Core Web API
- Understanding web service acronyms
- Creating an ASP.NET Core Web API project
- Reviewing the web service's functionality
- Creating a web service for the Northwind database
- Creating data repositories for entities
- Implementing a Web API controller
- Configuring the customers repository and Web API controller
- Specifying problem details
- Documenting and testing web services
- Consuming services using HTTP clients
- Implementing advanced features
- Understanding other communication technologies
- Practicing and exploring
- Summary
-
Building web services using ASP.NET Core Web API
- Building Intelligent Apps Using Machine Learning
-
Building Windows Desktop Apps
- Understanding legacy Windows application platforms
- Understanding the modern Windows platform
- Creating a modern Windows app
- Using resources and templates
- Using data binding
- Practicing and exploring
- Summary
-
Building Cross-Platform Mobile Apps Using Xamarin.Forms
- Understanding Xamarin and Xamarin.Forms
- Building mobile apps using Xamarin.Forms
- Consuming a web service from a mobile app
- Practicing and exploring
- Summary
- Epilogue
Product information
- Title: C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development - Fourth Edition
- Author(s):
- Release date: October 2019
- Publisher(s): Packt Publishing
- ISBN: 9781788478120
You might also like
book
C# 7.1 and .NET Core 2.0 - Modern Cross-Platform Development - Third Edition
C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development, Third Edition is a practical guide …
book
Hands-On Design Patterns with C# and .NET Core
Apply design patterns to solve problems in software architecture and programming using C# 7.x and .NET …
book
Enterprise Application Development with C# 9 and .NET 5
Become a professional .NET developer by learning expert techniques for building enterprise-grade applications Key Features Explore …
book
Pro C# 7: With .NET and .NET Core
This essential classic title provides a comprehensive foundation in the C# programming language and the frameworks …