/// <summary> /// 创建一个政策主表 /// </summary> /// <param name="validationErrors">返回的错误信息</param> /// <param name="db">数据库上下文</param> /// <param name="entity">一个政策主表</param> /// <returns></returns> public bool Create(ref ValidationErrors validationErrors, Insurance entity) { try { repository.Create(entity); return(true); } catch (Exception ex) { validationErrors.Add(ex.Message); ExceptionsHander.WriteExceptions(ex); } return(false); }