Jump to ratings and reviews
Rate this book

C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals: Start building websites and services with ASP.NET Core 8, Blazor, and EF Core 8

Rate this book
An accessible guide for beginner-to-intermediate programmers to the concepts, real-world applications, and latest features of C# 12 and .NET 8, with hands-on exercises using Visual Studio 2022 and Visual Studio Code.

Key FeaturesExplore the latest additions to C# 12, the .NET 8 class libraries, and Entity Framework Core 8Create professional websites and services with ASP.NET Core 8 and BlazorBuild your confidence with step-by-step code examples and tips for best practicesBook DescriptionThis latest edition of the bestselling Packt series will give you a solid foundation to start building projects using modern C# and .NET with confidence.

You'll learn about object-oriented programming; writing, testing, and debugging functions; and implementing interfaces. You'll take on .NET APIs for managing and querying data, working with the fi lesystem, and serialization. As you progress, you'll explore examples of cross-platform projects you can build and deploy, such as websites and services using ASP.NET Core.

This latest edition integrates .NET 8 enhancements into its type aliasing and primary constructors for concise and expressive code. You'll handle errors robustly through the new built-in guard clauses and explore a simplified implementation of caching in ASP.NET Core 8.

If that's not enough, you'll also see how native ahead-of-time (AOT) compiler publish lets web services reduce memory use and run faster. You'll work with the seamless new HTTP editor in Visual Studio 2022 to enhance the testing and debugging process. You'll even get introduced to Blazor Full Stack with its new unified hosting model for unparalleled web development flexibility.

What you will learnDiscover C# 12's new features, including aliasing any type and primary constructorsTry out the native AOT publish capability for ASP.NET Core 8 Minimal APIs web servicesBuild rich web experiences using Blazor Full Stack, Razor Pages, and other ASP.NET Core featuresIntegrate and update databases in your apps using Entity Framework Core modelsQuery and manipulate data using LINQBuild and consume powerful services using Web API and Minimal APIWho this book is forThis book is for beginners as well as intermediate-level C# and .NET programmers who have worked with C# in the past and want to catch up with the changes made in the last few years.

Prior exposure to C# or .NET is not a prerequisite. A general understanding of programming will help you to work through the book more comfortably, though the content is suitable for those completely new to programming.

If you already have some C# and .NET skills and want to focus on developing practical apps, you can pick up Mark’s other .NET book, Apps and Services with .NET 8, instead.

Table of ContentsHello, C#! Welcome, .NET!Speaking C#Controlling Flow, Converting Types, and Handling ExceptionsWriting, Debugging, and Testing FunctionsBuilding Your Own Types with Object-Oriented ProgrammingImplementing Interfaces and Inheriting ClassesPackaging and Distributing .NET TypesWorking with Common .

828 pages, Kindle Edition

Published November 14, 2023

68 people are currently reading
54 people want to read

About the author

Mark J. Price

27 books19 followers
Mark J Price is a former Microsoft Certified Trainer (MCT) and current Microsoft Specialist: Programming in C# and Architecting Microsoft Azure Solutions, with more than 20 years' of educational and programming experience.

Since 1993 Mark has passed more than 80 Microsoft programming exams and specializes in preparing others to pass them too. His students range from professionals with decades of experience to 16-year-old apprentices with none. Mark successfully guides all of them by combining educational skills with real-world experience consulting and developing systems for enterprises worldwide.

Between 2001 and 2003 Mark was employed full-time to write official courseware for Microsoft in Redmond, USA. Mark's team wrote the first training courses for C# while it was still an early alpha version. While with Microsoft he taught "train-the-trainer" classes to get other MCTs up-to-speed on C# and .NET.

Currently, Mark creates and delivers training courses for Episerver's Digital Experience Platform, the best .NET CMS for Digital Marketing and E-commerce.

In 2010 Mark studied for a Post-Graduate Certificate in Education (PGCE). He taught GCSE and A-Level mathematics in two London secondary schools. Mark holds a Computer Science BSc. Hons. Degree from the University of Bristol, UK.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
15 (65%)
4 stars
4 (17%)
3 stars
3 (13%)
2 stars
0 (0%)
1 star
1 (4%)
Displaying 1 - 5 of 5 reviews
9 reviews1 follower
November 16, 2023
I have been programming for a long time but I am relatively new to C# and .NET. Mark does an incredible job of balancing the material in a way that I believe would be very easy for beginners to understand, yet is not in any way boring or insulting for more experienced developers.

The author respects your time out of the gate and gets straight to it - letting you know what parts to jump to if you just need to know what’s new with this release. As an experienced programmer, I appreciate the golden nuggets of best practices and useful tips included throughout each chapter, especially since I haven’t used C#/.NET in a shared codebase. This keeps me from developing bad habits and having code smell.

When you purchase this book, you’re getting so much value because the author maintains extra sections and an errata online, you can download the code exercises, and I’ve seen Mark answering questions and patiently helping people on Discord, always treating others with dignity and respect. Submitting a correction is easy, and in my experience with the previous version the author was quick to add the correction and pleasant throughout the process.

If you’re on the fence, definitely make the purchase. C# is awesome, and .NET has improved a lot. This book serves as the best entry point into the language.
3 reviews
March 15, 2024
A great book to get up-to-date with dotnet if you haven't used it in a long time. The book has easy-to-follow examples that explain the new features of the framework while not getting into more complexity or extending the code beyond necessary. It must be said that you won't be making full websites, GUIs or console programs with only the material the book teaches you. The aim of the book is to give you a good understanding of the new features and tools at your disposal as well as explaining the changes made from the previous versions of dotnet and why these changes were made. You should get another book or online course if you want to get into, say, creating a full MVC website. That being said, if you haven't used dotnet for some time and want to get back into it, this book will get you back into dotnet quickly. Highly recommended.
Profile Image for Xianshun Chen.
88 reviews2 followers
February 24, 2025
The book is good for C# refresh, esp on Linux for dotnet. I would give it a 4 stars for chap 1 to 11, but the asp.net core chapters are not so great for reading, and i found microsoft documentation to be better source for learning on asp.net core. Also the book listed many tabulated references which are only good for reference purpose, making me wonder why i would read them instead of surfing google or msft documentation page for the same or more updated content.
1 review
November 20, 2023
Thank you very much to the author for continuously updating this book. I've read the previous edition, and compared to it, I feel that this book has undergone significant adjustments. In fact, my favorite part is Chapter Two. In contrast to the previous edition, the organization of the Chapter Two is more rational and well-suited for quickly grasping the new features of the language.
Profile Image for Timothy Babcock.
3 reviews
November 3, 2024
Good resource for . Net and web development

This is a good resource for learning how to get websites to work in blazor if your sites are running on .Net Framework.

Displaying 1 - 5 of 5 reviews

Can't find what you're looking for?

Get help and learn more about the design.