public static CampaignLogXMLDTO CampaignLogXMLToDTO(CampaignLogXML CampaignLogXML) { if (CampaignLogXML == null) return null; Mapper.CreateMap<CampaignLogXML, CampaignLogXMLDTO>(); CampaignLogXMLDTO CampaignLogXMLDTO = Mapper.Map<CampaignLogXMLDTO>(CampaignLogXML); return CampaignLogXMLDTO; }
/// <summary> /// Create CampaignLogXML /// </summary> /// <param name="CampaignLogXMLDTO">CampaignLogXML Object</param> /// <returns></returns> public static int Create(CampaignLogXMLDTO CampaignLogXMLDTO) { try { var CampaignLogXML = new CampaignLogXML(); using (var uow = new UnitOfWork()) { CampaignLogXML = Transform.CampaignLogXMLToDomain(CampaignLogXMLDTO); uow.CampaignLogXMLRepo.Insert(CampaignLogXML); uow.SaveChanges(); return (CampaignLogXML.Id); } } //catch (LoggedInUserException) //{ // throw new System.TimeoutException(); //} catch (Exception) { throw; } }