From the course: Building Web APIs with ASP.NET Core 8

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Creating a data model

Creating a data model

- [Instructor] Before we actually start implementing the API, we have to set up our data model, the APIs for HPlusSport. So let's check the HPlusSport shop here. And in the shop, we have several categories, and those categories can have an arbitrary number of products. So let's just jump into one of those categories and let's pick a product. And we have a name and we have a price. We also have sizes and colors and options. We'll ignore them because we don't need them for our API, at least not within the scope of our course. So the actual data model is a bit more complex than what we are doing. But with those information so far, we can implement quite a bit with a ASP.NET Core web API. Note that the cross-back training tank here somehow doesn't show a price. Why? Because it's not available. So we should also have an option in our model that something is just currently out of stock. Let's head back over to our application. Here in Visual Studio, I first set up a new folder where I will…

Contents