예제 #1
0
        public ImportedStatisticSetDTO MapToImportedStatisticSetDTO(ImportedStatisticSetEntity source, ImportedStatisticSetDTO target = null)
        {
            if (source == null)
            {
                return(null);
            }
            if (target == null)
            {
                target = new ImportedStatisticSetDTO();
            }

            MapToStatisticSetDTO(source, target);
            target.Description  = source.Description;
            target.ImportSource = source.ImportSource;
            target.FirstDate    = source.FirstDate.GetValueOrDefault();
            target.LastDate     = source.LastDate.GetValueOrDefault();

            return(target);
        }
예제 #2
0
        public ImportedStatisticSetEntity MapToImportedStatisticSetEntity(ImportedStatisticSetDTO source, ImportedStatisticSetEntity target = null)
        {
            if (source == null)
            {
                return(null);
            }
            if (target == null)
            {
                target = DefaultGet <ImportedStatisticSetEntity>(source);
            }

            if (MapToRevision(source, target) == false)
            {
                return(target);
            }

            MapToStatisticSetEntity(source, target, force: true);
            target.Description  = source.Description;
            target.FirstDate    = source.FirstDate;
            target.LastDate     = source.LastDate;
            target.ImportSource = source.ImportSource;

            return(target);
        }