public bool Create(List <PCRTestResult> recordList) { try { using (WanTaiEntities entities = new WanTaiEntities()) { foreach (PCRTestResult record in recordList) { entities.AddToPCRTestResults(record); } entities.SaveChanges(); return(true); } } catch (Exception e) { string errorMessage = e.Message + System.Environment.NewLine + e.StackTrace; LogInfoController.AddLogInfo(LogInfoLevelEnum.Error, errorMessage, SessionInfo.LoginName, this.GetType().ToString() + "->Create", SessionInfo.ExperimentID); return(false); } }