Show/Hide Toolbars

TMS XData Documentation

Navigation: TXDataClient

Removing Entities

Scroll Prev Top Next More

Use TXDataClient.Delete to delete an object from the server. The parameter must be the object itself:


Customer := Client.Get<TCustomer>(10);
Client.Delete(Customer); // delete customer


Pay attention to client memory management to learn which objects you need to manually destroy. Client won't destroy objects passed to Delete method. In the above example, though, the object doesn't need to be destroyed because it was previously retrieved with Get, and in this case (for objects retrieved from the server), the client will manage and destroy it.