title: The property 'Private' is not a String or Byte array. Length can only be configured for String and Byte array properties
body: <p>I tried to follow the Architecture Design at <a href="http://techbrij.com/generic-repository-unit-of-work-entity-framework-unit-testing-asp-net-mvc" rel="nofollow">http://techbrij.com/generic-repository-unit-of-work-entity-framework-unit-testing-asp-net-mvc</a> to build a small website but I got this error "The property 'Private' is not a String or Byte array. Length can only be configured for String and Byte array properties." when I call </p>
  
  <pre><code>User user = _userService.GetByName(username); from AccountController.cs
  </code></pre>
  
  <p>Here the call stack: </p>
  
  <pre><code>&gt; Kad.Repository.dll!Kad.Repository.GenericRepository&lt;Kad.Model.Category&gt;.FindBy(System.Linq.Expressions.Expression&lt;System.Func&lt;Kad.Model.Category,bool&gt;&gt; predicate) Line 32    C#
  
  &gt; Kad.Repository.dll!Kad.Repository.CategoryRepository.GetById(int id) Line 17  C#
  
  &gt; Kad.Service.dll!Kad.Service.CategoryService.GetById(int Id) Line 25   C#
  
  &gt; Kad.dll!Kad.Controllers.AccountController.Login(Kad.Models.LoginViewModel model, string returnUrl) Line 111   C#
  </code></pre>
  
  <p>The property 'Private' is not a String or Byte array. Length can only be configured for String and Byte array properties.</p>
  
  <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
  
  <p>Exception Details: System.InvalidOperationException: The property 'Private' is not a String or Byte array. Length can only be configured for String and Byte array properties.</p>
  
  <p>Source Error: 
  Line 32: IEnumerable query = _dbset.Where(predicate).AsEnumerable();
  Line 33: return query;</p>
  
  <p>Please tell me what happened with the code? Where I configure wrong!</p>