public void AddData(ModelNotifiedForTerritories modelNotifiedForTerritories, out string error) { TerritoriesGenericREST TerritoriesGenericREST = new TerritoriesGenericREST(wpfConfig); CreateTerritoriesView createTerritoriesView = new CreateTerritoriesView(); Cloner.CopyAllTo(typeof(ModelNotifiedForTerritories), modelNotifiedForTerritories, typeof(CreateTerritoriesView), createTerritoriesView); TerritoriesGenericREST.Insert(createTerritoriesView, out error); }