public void AddData(ModelNotifiedForProducts modelNotifiedForProducts, out string error) { ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig); CreateProductsView createProductsView = new CreateProductsView(); Cloner.CopyAllTo(typeof(ModelNotifiedForProducts), modelNotifiedForProducts, typeof(CreateProductsView), createProductsView); ProductsGenericREST.Insert(createProductsView, out error); }