O'Reilly logo

Blazor Revealed: Building Web Applications in .NET by Peter Himschoot

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Peter Himschoot 2019
Peter HimschootBlazor Revealedhttps://doi.org/10.1007/978-1-4842-4343-5_4

4. Services and Dependency Injection

Peter Himschoot1 
(1)
Melle, Belgium
 

Dependency inversion is one of the basic principles of good object-oriented design. The big enabler is dependency injection. In this chapter, you will look into dependency inversion and injection and why they are fundamental parts of Blazer. You will explore them by building a service that encapsulates where the data gets retrieved and stored.

What Is Dependency Inversion?

Currently your Blazor PizzaPlace app retrieves its data from hard-coded sample data. But in a real-life situation this data will be stored in a database on the server. Retrieving and storing this data can be done ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required