ABP Framework version: v4.3.3 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes
With suite, I create some entity and angular CRUD UI. All works. Now, I need to add some DTO and Api, which are special, and need I manually to add them.
My question is: How should I create DTO Model and Api in the Angular Part?
I try to use Cli "abp generate-proxy", it seems work for it. But I see the code created by Suite and Cli are different.
Test: I use suite to create entity "Order" and "OrderItem" for both backend and frontend (Angular), all works. Then, I use Cli "abp generate-proxy" to do one more time. the code are different. But all works.
So I worry about, if I use suite to create most my code. And I need to manually add DTO and Api, with Cli, they are different.
2 Answer(s)
-
0
Hello,
generate-proxy
command generates code from a running backend which makes it more reliable.suite
, on the other hand, does its best to simulate a running backend, so there are some differences between them. We'll check it out and try to minimize the diff. As to answer your question,generate-proxy
is better choice for proxy generation. Let's say you've created bunch of entities with suite which generates components as well as services, and then you runabp generate-proxy
which may change some of the files generated by suite. If it doesn't break your code, use the code generated bygenerate-proxy
.If you could share your entity.json, I'd try to find out why there is a diff.
-
0
This question has been automatically marked as stale because it has not had recent activity.