Reputation: 151
I am trying to build a web API by VS.net and test it use Postman, I would like to pass an empty string through Postman, but it is a null value instead of empty string at .net side, any idea? thanks.
Upvotes: 1
Views: 8330
Reputation: 19989
[DisplayFormat(ConvertEmptyStringToNull = false, NullDisplayText = "empty")]
can you try adding this :
You can also set it globally
https://stackoverflow.com/a/60749297/6793637
Upvotes: 2