Draggo
Draggo
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
❤️
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
What was the root issue (simplified lol)
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
sorry lol
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
ahhh so its working gotcha!
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
no it was a team member, they were having trouble debugging it
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
204 no content ssorry
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
on put and delete
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
now we are back at 204 not found
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
ok yay! it works
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
Item does not exist in current context
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
No description
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
No description
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
mapget takes 3 arguments
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
No description
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
No description
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
app.MapGet("/items/{id}", async (int id, InventoryDbContext dbContext)=> {
item = await dbContext.Items.FirstOrDefaultAsync(x => x.Id == id)
if (item is null)
return Results.NotFound()

return Results.Ok(item)
}
app.MapGet("/items/{id}", async (int id, InventoryDbContext dbContext)=> {
item = await dbContext.Items.FirstOrDefaultAsync(x => x.Id == id)
if (item is null)
return Results.NotFound()

return Results.Ok(item)
}
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
like this?
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
app.MapGet("/items/{id}", async (int id, InventoryDbContext dbContext)=> { item = await dbContext.Items.FirstOrDefaultAsync(x => x.Id == id) if (item is null) return Results.NotFound()
return Results.Ok(item) }
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
If i uncomment it
156 replies
CC#
Created by Draggo on 4/21/2024 in #help
Put and Delete Methods not working.
Operator '??' cannot be applied to operands of type 'Item' and 'IResult'CS0019
156 replies