I am building an MVC3 site using Entity Framework 4 and I am having a problem with fixed-length fields.
When I look at my code during debugging, it shows that MyEntity.Title="Hello name "with a header filled to the maximum length of the field.
This is usually a question of a fixed field length in an EDMX file or the use of a data type charin a base database, not in varchar.. In this case, none of them is correct, however, it is possible that the Initially specified fields had a fixed length. I manually changed each field in EDMX (and the model was regenerated) and the fields were never fixed length in the database (which was the starting point for the application), so I assume that the need to debug the fields is stored somewhere in the Entity Framework configuration and not updated.
The problem arises in new records, when they are added to the database - when the object is created, the Title will be correct when it is created from the database full.
What do I need to do to get rid of the fill, which really wraps my string comparisons if I don't crop everything?
source
share