Welcome to the navigation

Laboris enim mollit in consectetur incididunt aute sed nostrud eiusmod culpa dolor tempor deserunt proident, amet, cillum et dolore ut dolor sit anim lorem nulla. Non exercitation in dolore duis nisi voluptate quis enim occaecat nostrud id cupidatat in anim reprehenderit aute velit culpa consectetur ullamco amet, nulla est sint

Yeah, this will be replaced... But please enjoy the search!

Deleting a Contact (Customer) from Mediachase / EPiCommerce programmatically

This is a somewhat undocumented function but if you are familiar with the class BusinessManager in the Mediachase.BusinessFoundation.Data.Business namespace things become quite easy. To demonstrate this I created a customer called Test Testson

Snippet

To remove this customer contact programmatically with c# the following code is required

// Fetch the user
Mediachase.Commerce.Customers.CustomerContext customerContext = new Mediachase.Commerce.Customers.CustomerContext();
Mediachase.Commerce.Customers.CustomerContact testTestson = customerContext.GetContactById(new Guid("1c8279d8-85bd-4063-a018-a627f98c99cb"));

// Delete
Mediachase.BusinessFoundation.Data.Business.BusinessManager.Delete(testTestson);