Skip to content

09 Query optimization using DTO

MatthieuMEZIL edited this page May 30, 2015 · 3 revisions

In the previous workshop, we used DTO in service methods.

You can also use it for another purpose: optimize client query.

Indeed, when you use server unknown type on your client query, WAQS has to create them in running time (which has a little cost) but, worse, the serialization becomes really longer, particularly if you have a lot of data.

So instead of it, you can use DTO to use a type shared by client and server.

In this workshop, instead of declaring CustomerInfo in MainWindowViewModel, you will define it in DTO and then after running WAQS / Update Solution Generated Code you should have a solution like this one.