The property 'xxx' on entity type 'xxx' cannot be marked as nullable/optional because the type of the property is 'short' which is not a nullable type

c# entity-framework-core migration

Question

I have an entity with short data type and I want another entity to have a null-able relationship with this table. After executing Add-Migration I get the error in mentioned in Title of this question. Isn't it possible to have short as null-able property?

1
0
3/25/2020 7:31:11 PM

Accepted Answer

By changing short to short? the error is gone.

0
3/28/2020 6:11:32 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow