title: Unable to update database using savechanges() in Entity Framework
body: <p>I am trying the Model first approach of Entity Framework. I am a newbie to Entity Framework and learning from <a href="http://www.entityframeworktutorial.net/EntityFramework4.3/add-one-to-one-entity-using-dbcontext.aspx" rel="nofollow"> here</a> and coded the same way. But I am getting this error </p>
  
  <pre><code>Unable to update the EntitySet 'Users' because it has a DefiningQuery and no &lt;InsertFunction&gt; element exists in the &lt;ModificationFunctionMapping&gt; element to support the current operation.
  </code></pre>
  
  <p>the code I am running is: </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
  
          User use = new User();
          use.First_Name = "Arslan";
          use.Last_Name = "Akbar";
          use.Password = "alone";
          use.Email = "arslan@gmail.com";
          use.Designation = "Head";
          using (CustomersEntities ce = new CustomersEntities())
  
          {
  
              //int count = ce.Users.Count();
              //count++;
             // use.Id = count;
  
              ce.Users.Add(use);
              ce.SaveChanges();
            //  ce.Users.Create(use);
            //  ce.SaveChanges();
              //ce.Entry(use).State = System.Data.EntityState.Added;
  
          }
  
      }
  </code></pre>
  
  <p>I am unable to identify the issue.</p>