public static BOTechnology ConvertTechnologyToBOTechnology(TechnologyMaster technology) { BOTechnology boTechnology = new BOTechnology(); boTechnology.TechnologyId = technology.TechnologyId; boTechnology.TechnologyName = technology.TechnologyName; return(boTechnology); }
public static TechnologyMaster ConvertBOTechnologyToTechnology(BOTechnology boTechnology) { TechnologyMaster technology = new TechnologyMaster(); technology.TechnologyId = boTechnology.TechnologyId; technology.TechnologyName = boTechnology.TechnologyName; return(technology); }
public void AddTechnology(BOTechnology boTechnology) { try { TechnologyMaster technology = BusinessLayerHelper.ConvertBOTechnologyToTechnology(boTechnology); dataLayer.AddTechnology(technology); } catch (Exception ex) { throw ex; } }
public static List <BOTechnology> ConvertTechnologyListToBOTechnologyList(List <TechnologyMaster> technologies) { List <BOTechnology> businessTechnologies = new List <BOTechnology>(); foreach (TechnologyMaster technology in technologies) { BOTechnology boTechnology = ConvertTechnologyToBOTechnology(technology); businessTechnologies.Add(boTechnology); } return(businessTechnologies); }
public void AddTechnology() { try { BOTechnology boTechnology = new BOTechnology(); boTechnology.TechnologyName = "C#"; businessLayer.AddTechnology(boTechnology); } catch (Exception ex) { Console.WriteLine(ex.Message); } }