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)); }
public ConfiguringMms GetConfiguringMms(int id) { return(_configuringMmsRepository.GetConfiguringMms(id)); }