.NET Global Exception Handler to Return Problem Details For Your APIs

Esau Silva Social Media Card

This article will focus on handling custom exceptions for flow control on .NET with a global exception handler and return a problem details object. Having said that. There are, for the most part, two schools of thought. One where it is OK to throw a (custom) exception to control flow. i.e. Throw a UserNotFoundException when […]

How to Override Default Validation Error Message for Integer or Decimal Property in ASP.NET MVC – The value ‘xxx’ is not valid for Property

Unfortunately Microsoft did not incorporate a DataAnnotation to change the default message The value ‘xxx’ is not valid for Property to a custom one. This is when you create an int or decimal property in your model, you bind it to an input box (TextBoxFor) then try to submit the form, then you get this […]