Пример #1
0
 public static BodyMeasurement MapBLLEntityToPublicDTO(BLL.App.DTO.BodyMeasurement bllEntity)
 {
     return(new BodyMeasurement
     {
         Id = bllEntity.Id.ToString(),
         Height = bllEntity.Height,
         Weight = bllEntity.Weight,
         Chest = bllEntity.Chest ?? 0,
         Waist = bllEntity.Waist ?? 0,
         Hip = bllEntity.Hip ?? 0,
         Arm = bllEntity.Arm ?? 0,
         BodyFatPercentage = bllEntity.BodyFatPercentage,
         LoggedAt = bllEntity.LoggedAt
     });
 }
Пример #2
0
 public static BLL.App.DTO.BodyMeasurement MapPublicDTOFieldsToBLLEntity <TDto>(TDto dto,
                                                                                BLL.App.DTO.BodyMeasurement bllEntity)
     where TDto : BodyMeasurementCreate
 {
     bllEntity.Height            = dto.Height;
     bllEntity.Weight            = dto.Weight;
     bllEntity.Chest             = dto.Chest;
     bllEntity.Waist             = dto.Waist;
     bllEntity.Hip               = dto.Hip;
     bllEntity.Arm               = dto.Arm;
     bllEntity.BodyFatPercentage = dto.BodyFatPercentage;
     return(bllEntity);
 }