✅ Help Me:)
anyone can tell me what's wrong with my code? it didn't work, i tried breakpoints, but i see nothing😅
27 Replies
Define "didn't work"
My data didn't update when i tried on swagger
Well, you never change any properties of
entity
So you get the entity
from the repository, then you make no changes to it, then you save it as it isah
so after var blaa = katalogproduk.blaa i need to add something?
var blaa = katalogproduk.blaa
just declares a new variable named blaa
It doesn't change anything in the entity
so what should i do?
Uh, change the properties of
entity
?Angius#1586
REPL Result: Success
Console Output
Compile: 736.720ms | Execution: 67.149ms | React with ❌ to remove this embed.
See how the value of
Bar
changes?
Do thatwhat is this mean?
you have 2x
UpdateKatalogProduk
with the same parameters (as the first error states)
I'm a bit unsure why you created the second oneshould i just delete the second one?
Omg thank you
i figure it out
it works
i'm wrong, i thought it saved on database but it's not. What i miss?
sorry i'm new to this😢
start debugging
does it find the entity
it works here but not in database, in dabatase data not updated😅
use breakpoints
how are you handling the case where entity is not found
where i should put my breakpoints? in catch ex?
var entity = await _repository.KatalogProduk.FindByCondition....
the entity is found
what is the type of
_repository
and what does SaveAsync
doSaveAsync should save data but i think it didn't work
as irepository wrapper
but what does it do exactly
SaveAsync
I meanhey sorry i'm back, i added
_repository.KatalogProduk.Update(entity);
it workssave async