Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ASP.NET 8 Best Practices

You're reading from   ASP.NET 8 Best Practices Explore techniques, patterns, and practices to develop effective large-scale .NET web apps

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781837632121
Length 256 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jonathan R. Danylko Jonathan R. Danylko
Author Profile Icon Jonathan R. Danylko
Jonathan R. Danylko
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Chapter 1: Taking Control with Source Control 2. Chapter 2: CI/CD – Building Quality Software Automatically FREE CHAPTER 3. Chapter 3: Best Approaches for Middleware 4. Chapter 4: Applying Security from the Start 5. Chapter 5: Optimizing Data Access with Entity Framework Core 6. Chapter 6: Best Practices with Web User Interfaces 7. Chapter 7: Testing Your Code 8. Chapter 8: Catching Exceptions with Exception Handling 9. Chapter 9: Creating Better Web APIs 10. Chapter 10: Push Your Application with Performance 11. Chapter 11: Appendix 12. Index 13. Other Books You May Enjoy

Summary

In this chapter, we identified ways to prepare our code for a CI/CD pipeline so that we can build flawlessly, avoid relative path names with file-based operations, confirm our unit tests are unit tests, and create environment settings for our application. Once our code was ready, we examined what’s included in a common CI/CD pipeline, including a way to pull the code, build it, run unit tests with optional code analysis, create artifacts, wrap our code in a container, and deploy an artifact.

We also covered two ways to recover from a failed deployment using a fall-back or fall-forward approach. Then, we discussed common ways to prepare for deploying a database, which includes backing up your data, creating a strategy for modifying tables, adding a database project to your Visual Studio solution, and using Entity Framework Core’s migrations so that you can use C# to modify your tables.

We also reviewed the three types of CI/CD providers: on-premises, off-premises, and hybrid providers, with each one specific to a company’s needs, and then examined four cloud providers who offer full pipeline services: Microsoft’s DevOps Pipelines, GitHub Actions, Amazon’s CodePipeline, and Google’s CI.

Finally, we learned how to create a sample pipeline by preparing the application so that it meets certain requirements, logging in to Azure Pipelines and defining our sample project, identifying the repository we’ll be using in our pipeline, and creating the build. Once the build was complete, it generated our artifacts, and we learned how to create a release and find a way to deploy the build.

In the next chapter, we’ll learn about some of the best approaches for using middleware in ASP.NET Core.

You have been reading a chapter from
ASP.NET 8 Best Practices
Published in: Dec 2023
Publisher: Packt
ISBN-13: 9781837632121
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 $19.99/month. Cancel anytime
Banner background image