From the course: Building Angular and ASP.NET Web API Apps
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Define application models
From the course: Building Angular and ASP.NET Web API Apps
Define application models
- [Instructor] In ASP.NET, a model is a class that represents a database table where each property in the class matches a column in the table. In our app, we are going to have two tables. We are going to have a Users table, which is going to be used to basically just store user-related data because we need that when the user signs up, when the user logs in. But we are going to also store incomes and expenses, and since the only thing that changes in here is the type, so if something is an income or is an expense, we are going to create a table named Transactions. So, because we are going to have two tables in our database, it means that we need to create two models in our app. For that, let us go to Visual Studio. We are going to put all the models in a separate folder. For that, go to the Solution Explorer, then in here, right-click in the project, so Expenses.API. Then, go to Add and create a folder. Let us name this folder the Models. In the Models, now right-click, then go to Add.…
Contents
-
-
-
-
Create an empty Web API Project9m 4s
-
(Locked)
Define application models5m 47s
-
(Locked)
Configure entity framework for database access13m 55s
-
(Locked)
Build the Create API endpoint10m 41s
-
(Locked)
Create the read-all API endpoint3m 4s
-
(Locked)
Create the read by ID API endpoint6m 55s
-
(Locked)
Create the update API endpoint7m 4s
-
(Locked)
Create the delete API endpoint3m 10s
-
(Locked)
Cleanup Code16m 24s
-
-
-
-
-