コード例 #1
0
 public static CampaignLogXMLDTO CampaignLogXMLToDTO(CampaignLogXML CampaignLogXML)
 {
     if (CampaignLogXML == null) return null;
      Mapper.CreateMap<CampaignLogXML, CampaignLogXMLDTO>();
      CampaignLogXMLDTO CampaignLogXMLDTO = Mapper.Map<CampaignLogXMLDTO>(CampaignLogXML);
      return CampaignLogXMLDTO;
 }
コード例 #2
0
        /// <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;
            }
        }