public void SavePreLicenseCheck(AppPreLicenseCheckDTO model) { var prl = _dataService.GetEntity <PrlApplication>(p => p.Id == model.AppId).SingleOrDefault(); if (prl == null || string.IsNullOrEmpty(prl.ExpertiseResult) || prl.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.ExportPreLicenseCheck(preLicense); }