public static TimeRegistrationDto ToDTO(this TimeRegistrationRecord entity)
        {
            if (entity == null) return null;

            var dto = new TimeRegistrationDto();

            dto.key = entity.Id;
            dto.mainId = entity.MainId;
            dto.date = entity.Date;
            dto.value = entity.Value;

            entity.OnDTO(dto);

            return dto;
        }
Пример #2
0
        public static TimeRegistrationDto ToDTO(this TimeRegistrationRecord entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new TimeRegistrationDto();

            dto.key    = entity.Id;
            dto.mainId = entity.MainId;
            dto.date   = entity.Date;
            dto.value  = entity.Value;

            entity.OnDTO(dto);

            return(dto);
        }
Пример #3
0
        public static TimeRegistrationRecord ToEntity(this TimeRegistrationDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new TimeRegistrationRecord();

            entity.Id     = dto.key;
            entity.MainId = dto.mainId;
            entity.Date   = dto.date;
            entity.Value  = dto.value;

            dto.OnEntity(entity);

            return(entity);
        }
Пример #4
0
 static partial void OnEntity(this TimeRegistrationDto dto, TimeRegistrationRecord entity);
Пример #5
0
 static partial void OnDTO(this TimeRegistrationRecord entity, TimeRegistrationDto dto);
 static partial void OnDTO(this TimeRegistrationRecord entity, TimeRegistrationDto dto);