Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Practical C# Projects with .NET
  • Table Of Contents Toc
Practical C# Projects with .NET

Practical C# Projects with .NET

By : Matt Eland
close
close
Practical C# Projects with .NET

Practical C# Projects with .NET

By: Matt Eland

Overview of this book

Too many C# developers feel stuck building the same apps day in and day out, but learning through side projects can reignite your passion and level up your skills. This book offers a practical, hands-on approach to building confidence with .NET 10 and modern C# by building a variety of engaging applications, from interactive games and productivity tools to machine learning apps and browser-based chatbots. These projects are designed to teach practical patterns and modern tooling, with a focus on learning and experimentation over production hardening. You'll work with tools like Spectre.Console, ML.NET, Uno Platform, and more, developing everything from an adventure game and a card tracker to an AI chatbot. You’ll also build modern AI-enabled systems using Ollama, Microsoft Agent Framework, OpenTelemetry, and Aspire. Written by an experienced C# engineer and teacher, this book blends technical depth with a developer-friendly tone, helping you learn faster and retain more. You'll sharpen your understanding of core .NET capabilities and gain confidence to apply them in your own work or hobby projects. By the end of this book, you'll not only have a portfolio of practical .NET apps - you’ll also have grown as a developer and rediscovered the joy of programming. *Email sign-up and proof of purchase required
Table of Contents (21 chapters)
close
close
Lock Free Chapter
1
Part 1: Building Console Applications
6
Part 2: Web, Mobile, and Desktop Applications
10
Part 3: Building AI-powered side projects
15
Part 4: Cross-platform Game Development with MonoGame
20
Index

Mapping with AutoMapper

Let's turn our attention back to that auto.Map statement and explore what it is we're doing there and why we're doing it.

There are a few reasons we're mapping from our EF model to a custom .NET class. While we could return the EF model, doing so ties our responses directly to the structure of our database. This might result in database changes inadvertently changing the results we send back from our API, impacting external callers expecting results in a certain format. Additionally, I like to make an explicit decision about whether each property in the database should be exposed to external callers. For example, our User model has PasswordHash and Salt properties, which are sensitive pieces of information that we explicitly do not wish to return.

To help combat this, we're using response classes to expose data to external callers:

public abstract class CardResponse {
    public int Id { get; init; }
    public required...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Practical C# Projects with .NET
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon