23 Replies
What does
CreateCategory
return
this is the code from my prof I just followed his
I dont know what's wrong with my code I have the same as him
well, what do you expect
_categoryService.CreateCategory
to returnthe created route maybe?
?
the service class method
Oh thats what I thought
now this is the problem
![](https://utfs.io/f/c09e1820-dc9f-490b-9595-8d34902b6a29-4pl4mu.png)
says that it will return the id of newly created category
what's the signature of that method
these suggestions but I dont know if this will work but I think not
![](https://utfs.io/f/478e1754-8350-491a-8b2c-0bb86719fbbc-4pl4mu.png)
so yea this was given yesterday without discussion and I dont't even know what that is
do you understand method parameters and return value
yes
what are the parameters of
_categoryService.CreateCategory
and whad does it returnNEW CATEGORY
shet
ohsht
newcategory
show the signature of
CreateCategory
the code assumes it's returning an idthis???
CreateCategory(int WorkspaceId, [FromBody] CategoryCreationDto newCategory)
no, the service method
_categoryService.CreateCategory
Task<Category> CreateCategory(CategoryCreationDto categoryToCreate);
ok, then why are you providing 2 parameters
yea
my bad
that's why
WorkspaceId
and newCategory
yea yea