From the course: Practical Application Architecture with Entity Framework Core

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

DTOs

DTOs

- [Instructor] A DTO, or data transfer object, is a straightforward pattern that can be used in several different ways to regroup business data for a specific purpose. The models in NBC are a type of DTO. Opening the view models folder in the web project, there are a few different DTOs. The most interesting one that we have right now is the Create Order View model. We'll open it up. Let's run the app and have a quick view at creating an order. Select Orders, and Create New. On this screen we have a customer to select, a sales person to select, and a set of items to select from. All of the information for this screen has to come from somewhere. When we make some selections, and create a new order, the selections we made need to be sent back to the server to create the order. We can see our new order was successfully created. Let's stop debugging and go back to the Create Order view model. In the view model, we have the set information required to make an order. We have the products…

Contents