public void DeleteData(ModelNotifiedForProducts modelNotifiedForProducts, out string error) { ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig); DeleteProductsView deleteProductsView = new DeleteProductsView(); Cloner.CopyAllTo(typeof(ModelNotifiedForProducts), modelNotifiedForProducts, typeof(DeleteProductsView), deleteProductsView); ProductsGenericREST.Delete(deleteProductsView, out error); }