By default, strings in EF Code-First are considered as unicode and without
explicit length. They would be VARCHAR2 if
the [not unicode string] and [length < 4000 symbols] settings were specified
in mapping for a particular property.
Solution for the attribute mapping. Specify the MaxLength(123) attribute if you have the VARCHAR2(123) column in your database. Also turn off PropertyMaxLengthConvention from the Conventions collection in DbModelBuilder (this convention is used for unicode strings).
Solution for the smooth mapping is just Set HasMaxLength(123) and IsUnicode(false) for the corresponding property. In this case there is no need to turn off PropertyMaxLengthConvention.
And we have to disable auto proxy generation if we are using EF Code-First approch. This can be done by writing
Configuration.ProxyCreationEnabled = false;
in the constructor of the Context class.
Ref: http://forums.devart.com
Solution for the attribute mapping. Specify the MaxLength(123) attribute if you have the VARCHAR2(123) column in your database. Also turn off PropertyMaxLengthConvention from the Conventions collection in DbModelBuilder (this convention is used for unicode strings).
Solution for the smooth mapping is just Set HasMaxLength(123) and IsUnicode(false) for the corresponding property. In this case there is no need to turn off PropertyMaxLengthConvention.
And we have to disable auto proxy generation if we are using EF Code-First approch. This can be done by writing
Configuration.ProxyCreationEnabled = false;
in the constructor of the Context class.
Ref: http://forums.devart.com