Пример #1
0
        /// <summary>
        /// Get a configured ETL Import for a particular Import Guid
        /// </summary>
        public ETL.Contracts.ETLImportDefinition GetETLImportByImportGUID(Guid importGUID)
        {
            try
            {
                ETLImportDefinition import = (from e in dataContext.ETLImportDefinitions
                                              where e.ETLImportGUID == importGUID
                                              select e).FirstOrDefault();

                return(DataTransform.ToETLImportDefinitionContract(import));
            }
            catch (Exception ex)
            {
                throw HandleException(ex);
            }
        }
Пример #2
0
        private void FixupETLImportDefinition(ETLImportDefinition previousValue)
        {
            if (previousValue != null && previousValue.ETLImportEmails.Contains(this))
            {
                previousValue.ETLImportEmails.Remove(this);
            }

            if (ETLImportDefinition != null)
            {
                if (!ETLImportDefinition.ETLImportEmails.Contains(this))
                {
                    ETLImportDefinition.ETLImportEmails.Add(this);
                }
                if (ETLImportGUID != ETLImportDefinition.ETLImportGUID)
                {
                    ETLImportGUID = ETLImportDefinition.ETLImportGUID;
                }
            }
        }
Пример #3
0
 public static DataContracts.ETLImportDefinition ToETLImportDefinitionContract(DataRows.ETLImportDefinition row)
 {
     return(AutoMapper.Mapper.Map <DataContracts.ETLImportDefinition>(row));
 }