title: Whitespace when retrieving database row from Entity Framework
body: <p>I am using Entity Framework and I am adding a <code>User</code> (<code>UserName</code> and <code>Password</code>) to a database table. This table has a <code>UserName</code> column (<code>nchar(20)</code>) and a <code>Password</code> column which is hashed (<code>varchar(50)</code>). </p>
  
  <p>The problem occurs when I retrieve a User from the database. The username returned is padded with whitespace at the end (until 20 characters have been filled). I have solved this temporarily using the <code>Trim()</code> method however this seems impractical considering I need to do this on every column returned from the database.</p>
  
  <p>What is the other solution?</p>
  
  <p>Thanks!</p>