title: Exception while saving data in Entity Framework 4.0
body: <p><strong>Exception</strong> :</p>
  
  <blockquote>
    <p>Unable to update the EntitySet 'Audit_Log' because it has a
    DefiningQuery and no  element exists in the
     element to support the current
    operation.</p>
  </blockquote>
  
  <p>I am using like that</p>
  
  <pre><code>Audit_LogEntity ale = new Audit_LogEntity();`
  
  MemoryStream ms = new MemoryStream();
  NetDataContractSerializer serialize = new NetDataContractSerializer();
  
  serialize.Serialize(ms, obj);            
  
  Audit_Log al = new Audit_Log();
  al.Object = ms.ToArray();
  al.DateTime = DateTime.Now;
  al.Page_Name = pagename;
  al.Pageid = uniqueid;
  al.UserId = userid;
  
  ale.AddToAudit_Log(al);
  
  ale.SaveChanges();
  </code></pre>