public static ShrimpBreedDto ToShrimpBreedDto(this ShrimpBreed entity)
        {
            if (entity == null)
            {
                return(null);
            }

            ShrimpBreedDto dto = new ShrimpBreedDto();

            dto.CopyPropertiesFrom(entity);

            return(dto);
        }
        public static WorkDto ToWorkDto(this WorkResultDto entity)
        {
            if (entity == null)
            {
                return(null);
            }

            ShortFarmingLocationDto farmingLocation = new ShortFarmingLocationDto
            {
                Id   = entity.FarmingLocationId,
                Name = entity.FarmingLocationName,
                Code = entity.FarmingLocationCode
            };

            ShrimpBreedDto shrimpBreed = new ShrimpBreedDto
            {
                Id          = entity.ShrimpBreedId,
                Name        = entity.ShrimpBreedName,
                Code        = entity.ShrimpBreedCode,
                Description = entity.ShrimpBreedDescription,
                Attachment  = entity.ShrimpBreedAttachment
            };

            WorkDto dto = new WorkDto();

            dto.Id              = entity.Id;
            dto.Name            = entity.Name;
            dto.ExecutionTime   = entity.ExecutionTime.ToSecondsTimestamp();
            dto.Value           = entity.Value;
            dto.FarmingLocation = farmingLocation;

            dto.ShrimpBreed = shrimpBreed;

            dto.Curator = new UserDto
            {
                Id       = entity.UserId,
                FullName = entity.FullName,
                Address  = entity.Address,
                Phone    = entity.Phone,
                Email    = entity.Email,
            };

            dto.ShrimpCrop = new ShrimpCropDto
            {
                Id              = entity.ShrimpCropId,
                Name            = entity.ShrimpCropName,
                Code            = entity.ShrimpCropCode,
                FromDate        = entity.ShrimpCropFromDate.ToSecondsTimestamp(),
                ToDate          = entity.ShrimpCropToDate.ToSecondsTimestamp(),
                FarmingLocation = farmingLocation,
                ShrimpBreed     = shrimpBreed,
            };

            dto.ManagementFactor = new ShortManagementFactorDto
            {
                Id   = entity.ManagementFactorId,
                Name = entity.ManagementFactorName,
                Code = entity.ManagementFactorCode
            };

            dto.MeasureUnit = new MeasureUnitDto
            {
                Id         = entity.MeasureUnitId,
                Name       = entity.MeasureUnitName,
                Desciption = entity.MeasureUnitDesciption
            };

            dto.ModifiedAt  = entity.ModifiedAt.ToSecondsTimestamp();
            dto.SampleValue = entity.SampleValue;
            dto.Description = entity.Description;
            dto.age         = (int)(entity.ExecutionTime - entity.ShrimpCropFromDate).TotalDays;
            dto.Pictures    = entity.Pictures == null ? null : entity.Pictures.Split(',').Select(x => x.ToTempUploadDto()).ToArray();

            return(dto);
        }