Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Real-World Web Development with .NET 10

You're reading from   Real-World Web Development with .NET 10 Build websites and services using mature and proven ASP.NET Core MVC, Web API, and Umbraco CMS

Arrow left icon
Product type Paperback
Published in Dec 2025
Publisher Packt
ISBN-13 9781835888926
Length 744 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mark  J. Price Mark J. Price
Author Profile Icon Mark J. Price
Mark J. Price
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Introducing Real-World Web Development Using .NET 2. Building Websites Using ASP.NET Core MVC FREE CHAPTER 3. Model Binding, Validation, and Data Using EF Core 4. Building and Localizing Web User Interfaces 5. Authentication and Authorization 6. Performance and Scalability Optimization Using Caching 7. Web User Interface Testing Using Playwright 8. Configuring and Containerizing ASP.NET Core Projects 9. Building Web Services Using ASP.NET Core Web API 10. Building Clients for Web Services 11. Testing and Debugging Web Services 12. Building Web Services Using ASP.NET Core OData 13. Building Web Services Using FastEndpoints 14. Web Content Management Using Umbraco CMS 15. Customizing and Extending Umbraco CMS 16. Epilogue 17. Unlock Your Exclusive Benefits 18. Index

Looking for help

This section is about how to find quality information about programming on the web. You will learn about Microsoft Learn documentation, including its new MCP server for integration with AI systems, getting help while coding and using dotnet commands, getting help from fellow readers in the book’s Discord channel, searching the .NET source code for implementation details, and finally, making the most of modern AI tools like GitHub Copilot.

This is useful information that all readers should know and refer to throughout reading any of my .NET 10 books, especially if you are new to .NET.

This section has been made into a separate Appendix C, both to make it reusable in all four of my .NET 10 books, and to avoid wasting pages in the print book for those readers who have already read it from one of the other books.

An online Markdown version of Appendix C is available in the book’s GitHub repository at the following link: https://github.com/markjprice/markjprice/blob/main/articles/getting-help.md. Since this is hosted in my personal GitHub account, I can keep it updated more frequently throughout the three-year support period of .NET 10.

As part of this book’s free exclusive benefits, you can also access a PDF version of the book, which includes Appendix C. You can unlock it and the other benefits at the following link: https://packtpub.com/unlock, then search for this book by name. Ensure it’s the correct edition. Have your purchase invoice ready before you start.

Now let’s review two of the most important topics in Appendix C, Microsoft’s official documentation and its MCP server, and how to ask for help in this book’s Discord channel.

Microsoft Learn documentation and its MCP server

The definitive resource for getting help with Microsoft developer tools and platforms is in the technical documentation on Microsoft Learn, and you can find it at the following link: https://learn.microsoft.com/en-us/docs.

“One of the most ambitious and impactful projects our engineers have built recently is Ask Learn, an API that provides generative AI capabilities to Microsoft Q&A.” – Bob Tabor, Microsoft’s Skilling organization

You can read about Ask Learn at the following link:

https://devblogs.microsoft.com/engineering-at-microsoft/how-we-built-ask-learn-the-rag-based-knowledge-service/.

Microsoft has also created an MCP server for its official documentation so that chatbots can be configured to use the official documentation as a tool in their responses. The MCP server is accessible to any code editor or tool that supports the Model Context Protocol (MCP) using the following endpoint:

https://learn.microsoft.com/api/mcp

You can install it for VS Code and Cursor using the following link: https://github.com/MicrosoftDocs/mcp?tab=readme-ov-file#-installation--getting-started.

For Visual Studio, at the time of writing in June 2025, you must configure it manually using the following steps:

  1. In the MatureWeb folder, create a file named .mcp.json.
  2. In the .mcp.json file, define the endpoint for the Microsoft Docs MCP server, as shown in the following JSON:
    {
      "servers": {
        "microsoft.docs.mcp": {
          "type": "http",
          "url": "https://learn.microsoft.com/api/mcp"
        }
      }
    }
    
  3. In Visual Studio, make sure the MatureWeb solution is open in Solution Explorer.
  4. In the toolbar, click GitHub Copilot, and then navigate to Settings | Options…. You must be logged in with your GitHub account to see this option.
  5. In the Options dialog box, in the GitHub | Copilot section, select the Enable Agent mode in the chat pane and Enable MCP server integration in agent mode checkboxes.
  6. Open the GitHub Copilot Chat window.
  7. At the bottom of the chat window, select Agent mode, and then select the tool named microsoft_docs_search, as shown in Figure 1.16:
Figure 1.16: Configuring Copilot Chat tools

Figure 1.16: Configuring Copilot Chat tools

  1. Optionally, click the right-pointing black arrow to customize options like setting the tool to ask you before running, as shown in Figure 1.16.
  2. Select a model like GPT-4.1 or Claude Sonnet 3.7. Some models, like Gemini 2.5 Pro, might require additional configuration.
  3. Ask what the Northwind.UnitTests project does, as shown in the following query:
    What does the Northwind.UnitTests project do?
    
  4. Note the response (the response you get will be different since LLMs are non-deterministic):
    5 references
    Read 5 code snippets for 'test', 'unit test', ...
    The Northwind.UnitTests project is a test project that uses the xUnit framework to perform unit and integration tests on the Northwind application. Specifically, it tests the Northwind.EntityModels and Northwind.DataContext projects. The tests include:
    •    Verifying that the database connection can be established.
    •    Checking that the number of categories in the database matches the expected count.
    •    Ensuring that the product with ID 1 is named "Chai".
    The project references xUnit and related test packages, and it depends on the Northwind.DataContext project for database access. These tests help ensure that the application's data access layer is functioning correctly.
    
  5. Ask for important details about the int data type in the official documentation, as shown in the following query:
    What remarks about int are in the docs?
    
  6. When the model tries to use the MCP server, click Allow this time. Other options include Always allow, Allow in this solution, and Deny.
  7. Note the response:
    Here are some key remarks about int in the official documentation:
    •    int in C# is a 32-bit signed integer, represented by System.Int32, with a value range from -2,147,483,648 to 2,147,483,647.
    •    int is an immutable value type.
    •    Integer division truncates the result, and the remainder can be obtained with the % operator.
    •    int has minimum and maximum limits; exceeding these causes overflow or underflow, wrapping the value.
    •    int is a value type (struct) and derives from System.Object.
    •    Type conversions involving int may require explicit casting, and overflow can occur if the value is out of range.
    

You can read more about the Microsoft Learn MCP server at the following link: https://github.com/MicrosoftDocs/mcp.

Getting help on Discord and other chat forums

Asking questions in programming forums and Discord channels is an art as much as it is a science. To maximize your chances of receiving a helpful answer, there’s a blend of clarity, specificity, and community awareness that you should aim for.

Here are some tips for asking questions:

  • Ask in a public channel, not in private: Please do not direct message an author with a question or a friend request. Remember, every question asked and answered builds the collective knowledge and resourcefulness of the whole community. Asking in public also allows other readers to help you, not just the author. The community that Packt and I have built around my books is friendly and smart. Let us all help you.
  • Research before asking: It’s important to look for answers yourself before turning to the community. Use search engines, official documentation, and the search function within the forum or Discord server. This not only respects the community’s time but also helps you learn more effectively. Another place to look first is the errata and improvements section of the book, found at the following link: https://github.com/markjprice/web-dev-net10/blob/main/docs/errata/README.md.
  • Be specific and concise: Clearly state what you’re trying to achieve, what you’ve tried so far, and where you’re stuck. A concise question is more likely to get a quick response.
  • Specify the book location: If you are stuck on a particular part of the book, specify the page number and section title so that others can look up the context of your question.
  • Show your work: Demonstrating that you’ve made an effort to solve the problem yourself not only provides context but also helps others understand your thought process and where you might have gone down the wrong path.
  • Prepare your question: Avoid too broad or vague questions. Screenshots of errors or code snippets (with proper formatting) can be very helpful.

    Oddly, I’ve been seeing more and more examples of readers taking photos of their screens and posting those. These are harder to read and limited in what they can show. It’s better to copy and paste the text of your code or the error message so that others can copy and paste it themselves. Alternatively, at least take a high-resolution screenshot instead of a photo with your phone camera at a jaunty angle!

  • Format your code properly: Most forums and Discord servers support code formatting using Markdown syntax. Use formatting to make your code more readable. For example, surround code keywords in single backticks, like `public void`, and surround code blocks with three backticks with optional language code, as shown in the following code:
    ```cs
    using static System.Console;
    WriteLine("This is C# formatted code.");
    ```
    

Good practice: After the three backticks that start a code block in Markdown, specify a language short name like cs, csharp, js, javascript, json, html, css, cpp, xml, mermaid, python, java, ruby, go, sql, bash, or shell.

To learn how to format text in Discord channel messages, see the following link: https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline.

  • Be polite and patient: Remember, you’re asking for help from people who are giving their time voluntarily. A polite tone and patience while waiting for a response go a long way. Channel participants are often in a different time zone, so you may not see your question answered until the next day.
  • Be ready to actively participate: After asking your question, stay engaged. You might receive follow-up questions for clarification. Responding promptly and clearly can significantly increase your chances of getting a helpful answer. When I ask a question, I set an alarm for three hours later to go back and see if anyone has responded. If there hasn’t been a response yet, then I set another alarm for 24 hours later.

Incorporating these approaches when asking questions not only increases your likelihood of getting a useful response but also contributes positively to the community by showing respect for others’ time and effort.

Good practice: Never just say “Hello” as a message on any chat system. You can read why at the following link: https://nohello.net/. Similarly, don’t ask to ask: https://dontasktoask.com/.

lock icon The rest of the chapter is locked
Visually different images
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.
Real-World Web Development with .NET 10
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon