public void SavePreLicenseCheck(AppPreLicenseCheckDTO model) { var trl = _dataService.GetEntity <TrlApplication>(p => p.Id == model.AppId).SingleOrDefault(); if (trl == null || string.IsNullOrEmpty(trl.ExpertiseResult) || trl.ExpertiseResult == "Negative") { return; } var preLicense = _dataService.GetEntity <AppPreLicenseCheck>(p => p.Id == model.Id).SingleOrDefault(); if (preLicense != null) { return; } preLicense = new AppPreLicenseCheck(); _objectMapper.Map(model, preLicense); _dataService.Add(preLicense); _dataService.SaveChanges(); _limsExchangeService.ExportPreLicenseCheckTRL(preLicense); //TODO: Сделать спросить Юры }