예제 #1
0
        public MobileTestingMms CreateMobileTestingMms(MobileTestingMms mobileTestingMms)
        {
            if (mobileTestingMms.ConfiguringMmsId != 0)
            {
                var configuringMms = _configuringMmsRepository.
                                     GetConfiguringMms(mobileTestingMms.ConfiguringMmsId);
                if (configuringMms.MobileTestingMms != null)
                {
                    throw new Exception();
                }
                mobileTestingMms.ConfiguringMms = configuringMms;
            }
            else
            {
                throw new ArgumentException($"Please, enter ID Configuring ");
            }
            if (mobileTestingMms.AuthorId != null)
            {
                mobileTestingMms.Author = _authorRepository
                                          .GetAuthor(mobileTestingMms.AuthorId.Value);
            }

            return(_mobileTestingMmsRepository.CreateMobileTestingMms(mobileTestingMms));
        }
예제 #2
0
 public ConfiguringMms GetConfiguringMms(int id)
 {
     return(_configuringMmsRepository.GetConfiguringMms(id));
 }