public void SavePreLicenseCheck(AppPreLicenseCheckDTO model) { var iml = _dataService.GetEntity <ImlApplication>(p => p.Id == model.AppId).SingleOrDefault(); if (iml == null || string.IsNullOrEmpty(iml.ExpertiseResult) || iml.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.ExportPreLicenseCheckIML(preLicense); //TODO: Сделать спросить Юры }