//Mapping one Topic from DO to PO public static TopicPO MapDOtoPO(TopicDO from) { TopicPO to = new TopicPO(); to.TopicID = from.TopicID; to.Topic = from.Topic; //Returning Topic return(to); }
//Mapping list of Topics from PO to DO public static List <TopicPO> MapDOtoPO(List <TopicDO> from) { List <TopicPO> to = new List <TopicPO>(); if (from != null) { foreach (TopicDO item in from) { //Changing a DO munition to a PO munition TopicPO mappedItem = MapDOtoPO(item); //Adding PO munition to a list of PO munitions to.Add(mappedItem); } } //Returning list of Topics return(to); }