public static ShrimpCrop ToShrimpCrop(this ShrimpCropDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            ShrimpCrop entity = new ShrimpCrop();

            entity.CopyPropertiesFrom(dto);

            return(entity);
        }
        public static ShrimpCropDto ToShrimpCropDto(this ShrimpCrop entity)
        {
            if (entity == null)
            {
                return(null);
            }

            ShrimpCropDto dto = new ShrimpCropDto();

            dto.CopyPropertiesFrom(entity);

            dto.ShrimpBreed         = entity.ShrimpBreed.ToShrimpBreedDto();
            dto.FarmingLocation     = entity.FarmingLocation.ToShortFarmingLocationDto();
            dto.FromDate            = entity.FromDate.ToSecondsTimestamp();
            dto.ToDate              = entity.ToDate.ToSecondsTimestamp();
            dto.HasManagementFactor = entity.ShrimpCropManagementFactors.Count > 0;

            return(dto);
        }