コード例 #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));
 }