public ModelNotifiedForProducts GetProductsByID(int ProductID, out string error) { error = null; ProductsGenericREST ProductsGenericREST = new ProductsGenericREST(wpfConfig); GetProductsView getProductsView = ProductsGenericREST.GetByPK <GetProductsView>(ProductID, out error)[0]; ModelNotifiedForProducts modelNotifiedForProducts = new ModelNotifiedForProducts(); Cloner.CopyAllTo(typeof(GetProductsView), getProductsView, typeof(ModelNotifiedForProducts), modelNotifiedForProducts); return(modelNotifiedForProducts); }