public WeighingMeasurementTrays ConvertToWeighingMeasurementTrays()
        {
            WeighingMeasurements weighingMeasurement = null;

            if (this.WeighingMeasurement != null)
            {
                weighingMeasurement = this.WeighingMeasurement.ConvertToWeighingMeasurements();
            }

            var weighingMeasurementTrays = new WeighingMeasurementTrays
            {
                Id = this.Id,
                WeighingMeasurementId     = this.WeighingMeasurementId,
                InterventionDayTrayTypeId = this.InterventionDayTrayTypeId,
                Quantity   = this.Quantity,
                DtCreated  = this.DtCreated,
                CreatedBy  = this.CreatedBy,
                DtModified = this.DtModified,
                ModifiedBy = this.ModifiedBy,

                InterventionDayTrayType = this.InterventionDayTrayType,
                WeighingMeasurement     = weighingMeasurement
            };

            return(weighingMeasurementTrays);
        }
        public WeighingMeasurementTrayViewModel(WeighingMeasurementTrays model)
        {
            this.Id = model.Id;
            this.WeighingMeasurementId     = model.WeighingMeasurementId;
            this.InterventionDayTrayTypeId = model.InterventionDayTrayTypeId;
            this.Quantity   = model.Quantity;
            this.DtCreated  = model.DtCreated;
            this.CreatedBy  = model.CreatedBy;
            this.DtModified = model.DtModified;
            this.ModifiedBy = model.ModifiedBy;

            this.InterventionDayTrayType = model.InterventionDayTrayType;
        }