Note that there are some explanatory texts on larger screens.

plurals
  1. POInsert, Update and Delete methods of RIA Services are invisible under WPF Client to RIA Services
    text
    copied!<p>I really cannot figured out why under the WPF client to RIA Services I cannot see methods to Update, Insert and Delete. But I can see all "GET" methods only. </p> <pre><code>RiaService.DomainServicesoapClient proxy = new RiaService.DomainServicesoapClient( EndPointConfigurationNameData, EndpointAddress); proxy.GetClients(); // That's OK // But where is ???? proxy.UpdateClient(... </code></pre> <p>The code below has been generated by Visual Studio 2010.</p> <pre><code>[RequiresAuthentication] [EnableClientAccess()] public class RiaDomainService : LinqToEntitiesDomainService&lt;MyEntities&gt; { ..... // TODO: // Consider constraining the results of your query method. If you need additional input you can // add parameters to this method or create additional query methods with different names. // To support paging you will need to add ordering to the 'Clients' query. [Query(IsDefault = true)] public IQueryable&lt;Client&gt; GetClients() { return this.ObjectContext.Clients; } public void InsertClient(Client client) { if ((client.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(client, EntityState.Added); } else { this.ObjectContext.Clients.AddObject(client); } } public void UpdateClient(Client currentClient) { this.ObjectContext.Clients.AttachAsModified(currentClient, this.ChangeSet.GetOriginal(currentClient)); } public void DeleteClient(Client client) { if ((client.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(client, EntityState.Deleted); } else { this.ObjectContext.Clients.Attach(client); this.ObjectContext.Clients.DeleteObject(client); } } </code></pre> <p>So CRUD methods not getting recognized by the RIA context... Any clue how to get it under the client side</p> <p><strong>UPDATES:</strong></p> <p>I found that this code works like a CRUD</p> <pre><code>RiaService.ChangeSetEntry changeSetEntry = new RiaService.ChangeSetEntry(); changeSetEntry.Entity = {entity itslef}; changeSetEntry.Operation = RiaService.DomainOperation.Insert; changeSetEntries.Add(changeSetEntry); proxy.SubmitChanges(changeSetEntries.ToArray()); </code></pre> <p>My question then: Are there any other methods to realize CRUD operations under WPF client to RIA Services?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload