title: object does not contain a definition for "SaveChanges"
body: <p>I got an error and it's so nerve-wracking ... I added a partial class to my project and put SaveChangeExeptionEntities for it's name...</p>
  
  <p>I got this error:</p>
  
  <blockquote>
    <p>object does not contain a definition for "SaveChanges"</p>
  </blockquote>
  
  <p>and here is code :</p>
  
  <pre><code>    using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Data.Entity.Validation;
  using System.ComponentModel;
  
  namespace WindowsFormsApplication6
  {
     public partial class SaveChangeExeptionEntities
      {
         public override int SaveChanges()
         {
             try
             {
                 return base.SaveChanges();
             }
             catch (DbEntityValidationException ex)
             {
                 // Retrieve the error messages as a list of strings.
                 var errorMessages = ex.EntityValidationErrors
                         .SelectMany(x =&gt; x.ValidationErrors)
                         .Select(x =&gt; x.ErrorMessage);
  
                 // Join the list to a single string.
                 var fullErrorMessage = string.Join("; ", errorMessages);
  
                 // Combine the original exception message with the new one.
                 var exceptionMessage = string.Concat(ex.Message, " The validation errors are: ", fullErrorMessage);
  
                 // Throw a new DbEntityValidationException with the improved exception message.
                 throw new DbEntityValidationException(exceptionMessage, ex.EntityValidationErrors);
             }
         }
      }
  }
  </code></pre>
  
  <p>pls help me! I'm going to crazy :(</p>