title: Validation failed for one or more entities. See EntityValidationErrors property for more details
body: <p>I have the following two domain Models.</p>
  
  <pre><code>[Table("tblActual_AgencyProfile")]
  public class AgencyModel
  {
      public AgencyModel()
      {
          CategoryItemList = new List&lt;CategoryModel&gt;();
          user = new UserProfile();
      }
  
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int ID { get; set; }
      public string UniqueURL { get; set; }
      public string Name { get; set; }
      public string Title { get; set; }
      public string Address { get; set; }
      public string Phone { get; set; }
      public string Fax { get; set; }
      public string Email { get; set; }
      public string ABN { get; set; }
      public string CAN { get; set; }
      public string PhotoURL { get; set; }
      public string Summary { get; set; }
      public string Specialities { get; set; }
      public string LocationsServices { get; set; }
      public DateTime? ImportedDateTime { get; set; }
      public int? UserID { get; set; }
  
      [ForeignKey("UserID")]
      public UserProfile user { get; set; }
  
      public ICollection&lt;CategoryModel&gt; CategoryItemList { get; set; }
  }
  
  
  [Table("UserProfile")]
  public class UserProfile
  {
      public UserProfile()
      {
          Actual_Category_List = new List&lt;CategoryViewModel&gt;();
      }
  
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int UserId { get; set; }
      public string UserName { get; set; }
      [Required]
      public string UserType { get; set; }
      [RequiredIfAttribute("UserType", "Agency")]
      public string AgencyName { get; set; }
      public string Title { get; set; }
      [Required]
      public string FirstName { get; set; }
      [Required]
      public string LastName { get; set; }
      [Required]
      public string Address { get; set; }
      [Required]
      public string Suburb { get; set; }
      [Required]
      public string State { get; set; }
      [Required]
      public string PostCode { get; set; }
      [Required]
      public string Phone { get; set; }
      public string Fax { get; set; }
      public string Mobile { get; set; }
      [EmailAddress]
      [Required]
      public string EmailAddress { get; set; }
      public ICollection&lt;CategoryViewModel&gt; Actual_Category_List { get; set; }
  }
  </code></pre>
  
  <p>Then I have an Update method in my Repository class</p>
  
  <pre><code>public void EditDetails(AgencyViewModel model)
  {
      try
      {
          using (WebScrapperDBContext contex = new WebScrapperDBContext())
          {
              using (TransactionScope scope = new TransactionScope())
              {
                  AgencyModel agency = (from tb in contex.agencies where tb.ID == model.ID select tb).SingleOrDefault();
                  agency.Address = model.Address;
                  agency.Email = model.Email;
                  agency.Fax = model.Fax;
                  agency.LocationsServices = model.LocationsServices;
                  agency.Name = model.Name;
                  agency.Phone = model.Phone;
                  if (!string.IsNullOrEmpty(agency.PhotoURL))
                      agency.PhotoURL = model.PhotoURL;
                  agency.Specialities = model.Specialities;
                  agency.Summary = model.Summary;
  
                  agency.user.Address = model.Address;
                  agency.user.AgencyName = model.Name;
                  agency.user.EmailAddress = model.Email;
                  agency.user.Fax = model.Fax;
                  agency.user.Mobile = model.Mobile;
                  agency.user.Phone = model.Phone;
                  agency.user.PostCode = model.PostCode;
                  agency.user.State = model.State;
                  agency.user.Suburb = model.Suburb;
  
                  contex.SaveChanges();
  
                  scope.Complete();
              }
          }
      }
      catch (Exception ex)
      {
          throw ex;
      }
  }
  </code></pre>
  
  <p>As you can see, I don't want to update all the fields in <code>UserProfile</code> (Ex: <code>FirstName</code>, <code>LastName</code>). When I run the <code>EditDetails()</code> method it throws an exception</p>
  
  <blockquote>
    <p>Validation failed for one or more entities. See
    'EntityValidationErrors' property for more details.</p>
  </blockquote>
  
  <p>This could be because I'm skipping some required fields in the domain model. How can I solve this issue?</p>