C
C#14mo ago
DragonA.

Create issue

"InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'." I think that's happens because of my model which has an Int type element (HubQuantity). But i don't know how to fix it and program could work with it. https://github.com/KostinAntonKIUKI202/diploma
GitHub
GitHub - KostinAntonKIUKI202/diploma: ASP.NET/SQL Server 2019/TREK ...
ASP.NET/SQL Server 2019/TREK Bike catalog. Contribute to KostinAntonKIUKI202/diploma development by creating an account on GitHub.
No description
No description
No description
2 Replies
Thinker
Thinker14mo ago
I assume this is because you have a StringLength attribute on an int property, so the validator tries to cast the value to a string which obviously fails.
DragonA.
DragonA.OP14mo ago
thanks
Want results from more Discord servers?
Add your server