title: Partial class not working
body: <p>I'm working on an intranet and have a long model that was generated by EntityFramework for my Employee Database, I wanted to divide the password from it, and since it's a partial class I figured I'd create this : </p>
  
  <pre><code>namespace CRAWebSiteMVC.Models
  {
      public partial class Employee
      {
          public global::System.String Password
          {
              get
              {
                  return _Password;
              }
              set
              {
                  OnPasswordChanging(value);
                  ReportPropertyChanging("Password");                    
                  ReportPropertyChanged("Password");
                  OnPasswordChanged();
              }
          }
          private global::System.String _Password;
          partial void OnPasswordChanging(global::System.String value);
          partial void OnPasswordChanged();
  
      }
  
  }
  </code></pre>
  
  <p>But now, whenever I try to assign a value to password it always end up have a null value.</p>
  
  <p>E.g : </p>
  
  <pre><code>  [HttpPost]
      public ActionResult Create([Bind(Exclude = "Id")] Employee objEmployee, FormCollection form)
      {
          ViewBag.CompanyList = _service.ListCompany();
          ViewBag.SupervisorList = _service.ListSupervisor();
  
          objEmployee.CreatedDate = System.DateTime.Now; // They will get the good value
          objEmployee.UpdatedDate = System.DateTime.Now;
  
          objEmployee.Password = form["Password"]; // will always be = to null, even when the form is filled
      }
  </code></pre>
  
  <p>What can be the cause of this?</p>
  
  <p>EDIT : Password now has a value, thank you all.</p>
  
  <p>But now the following error occures : </p>
  
  <pre><code>An error occurred while updating the entries. See the inner exception for details.
  </code></pre>
  
  <p>At this point :</p>
  
  <pre><code> public Employee Create(Employee objEmployee)
      {
          _entities.AddToEmployees(objEmployee);
          _entities.SaveChanges(); // Fails here
          return objEmployee;
      }
  </code></pre>
  
  <p>How can a SaveChange fail like that?</p>