i hope i can explain my big problem hi sir, i am trying to do update method in a composite key class here is my steps with some attachment: hope you can help me 1- created class (createUpdateDto) 2- put my key into it 3- create an interface 4- create service 5- create controller (i know abp gives me auto controller but i should do it because i have more than module)
i faced problem when trying to update in swagger (error 400) The value '{documentStatusId}' is not valid for DocumentStatusId. i cached the problem in routing he says unused route parameter like image below so i fixed it inject int documentStatuesId and string cultureId and error is gone but interface says i must generate method exactly right my interface see picture and you will understand me thank
- ABP Framework version: v8
- UI Type:MVC
- Database System: EF Core (SQL Server)
15 Answer(s)
-
0
hi
How does a
documentStatusId
represent a class with two parameters? I don't think it's possible by default.See https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-8.0 https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-8.0#custom-route-constraints
-
0
It's a composite key Did you mean i must delete it from route ?? If i delete it it still have an unused route with Culture Id
-
0
hi
You can consider using single parameters.
eg:
appservice
UpdateAsync(int documentStatusId, string cultureld, CreateUpdateDocumentStatusCultureDto input)
contoller
[HttpPut] [Route("{documentStatusId}/{cultureld}")] UpdateAsync(int documentStatusId, string cultureld, CreateUpdateDocumentStatusCultureDto input)
-
0
Hi Thanks for responding But i already did it in the last 2 imgs and have an error implementing interface
-
0
You need to change the interface and implementation of the application service
-
0
-
0
hi
Can you share a test project? liming.ma@volosoft.com
-
0
check your mail thank you
-
0
-
0
How will i remove the interface ?? All methods into it and controller will not work. All the project is alote of models i just have problem with code i shared all pages are working good This culture get and create are also working good My problem with update and download excel If i removed the interface you mentioned i will face a problem with the interface in application.cotract project
-
0
hi
Can you share a complete project, I will debug it to check the problem.
liming.ma@volosoft.com
-
0
Hi sir I already sent you the project with mapping and entityframe work every thing Just make (abp new test) And put files i shared
-
0
hi
Can you share a project that I can build and test?
Thanks.
-
0
Hi sir I tried to share but i couldn't It's a lot of files with azure connection with multiple model and projects and it's more than 2GB So i tried to give you the best way to help me with sharing files and source code that i have problem with and explain exactly what i did and what i faced and what the steps and all what i did I hope to help me or kindly tell me you don't have the solution Thanks your effort
-
0
hi
Can you reproduce your problem in a new template project?
Thanks