It's necessary that both your table AND your data model entity are configured properly.
Database, it is specific, you should check their docs.
EF is pretty straight forward as well, using model creation with fluent API, or attributes. Also, check their docs.