Esempio n. 1
0
        public CalibrationMms CreateCalibrationMms(CalibrationMms calibrationMms)
        {
            if (calibrationMms.MobileTestingMmsId != 0)
            {
                var mobileTestingMms = _mobileTestingMmsRepository.
                                       GetMobileTestingMms(calibrationMms.MobileTestingMmsId);
                if (mobileTestingMms.CalibrationMms != null)
                {
                    throw new Exception();
                }
                calibrationMms.MobileTestingMms = mobileTestingMms;
            }
            else
            {
                throw new ArgumentException($"Please, enter ID Mobile Testing ");
            }
            if (calibrationMms.AuthorId != null)
            {
                calibrationMms.Author = _authorRepository.GetAuthor(calibrationMms.AuthorId.Value);
            }

            return(_calibrationMmsRepository.CreateCalibrationMms(calibrationMms));
        }
Esempio n. 2
0
 public MobileTestingMms GetMobileTestingMms(int id)
 {
     return(_mobileTestingMmsRepository.GetMobileTestingMms(id));
 }