Q25.webp
M

Q25.webp

Kizspy | Question: 25
(Choose 1 answer)
In a .NET 8 Web API, what is the recommended way to handle model validation errors automatically and return a 400 Bad
Request response?
A. Manually checking ModelState.IsValid in every action.
B. The [ApiController] attribute automatically handles it.
C. Using a custom middleware to inspect every request.
D. Relying on the database to throw an exception.

Thông tin

Category
PRN232
Thêm bởi
Minh Châu1
Ngày thêm
Lượt xem
2,565
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom