title: How to stop WCF data Service to fetch data when SavingChanges (during update)
body: <p>I am trying to update an entity from a WCF client as follows:</p>
  
  <pre><code>        Ctxt.MergeOption = MergeOption.NoTracking;
          var q = Ctxt.Customers.Where(p =&gt; p.MasterCustomerId == "JEFFERSON").Select(o =&gt; o);
          //DataServiceCollection&lt;Customer&gt; oCustomers = new DataServiceCollection&lt;Customer&gt;(q, TrackingMode.None);
          DataServiceCollection&lt;Customer&gt; oCustomers = new DataServiceCollection&lt;Customer&gt;(q);
          oCustomers[0].FirstName = "KEFFERSON";
          //Ctxt.SaveChanges(SaveChangesOptions.ReplaceOnUpdate);
          //ctxt.SaveChangesDefaultOptions = SaveChangesOptions.ReplaceOnUpdate;
          Ctxt.SaveChanges();
  </code></pre>
  
  <p>When I try to save the modified entity, it first tries to load that entity using a select query (to database) and then issues update statement to database.</p>
  
  <p>In my case, I simply want to have the entity to be directly updated in the database  without fetching it first.  I don't mind if it overwrites the data in database</p>
  
  <p>I tried the following at WCF service:</p>
  
  <pre><code>protected override EF.Model.DataModel.PersonifyEntities CreateDataSource()
  {
      var ctxt = new EF.Model.DataModel.PersonifyEntities();
      ctxt.Customers.MergeOption = System.Data.Objects.MergeOption.NoTracking;
      ctxt.ContextOptions.ProxyCreationEnabled = false;
      ctxt.ContextOptions.LazyLoadingEnabled = false;
      return ctxt;
  }
  </code></pre>
  
  <p>But, no luck.  Can anyone help me on this?</p>