public bool Create(ReagentAndSuppliesConfiguration configuration) { try { using (WanTaiEntities entities = new WanTaiEntities()) { entities.AddToReagentAndSuppliesConfigurations(configuration); 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); } }