Ejemplo n.º 1
0
        /// <summary>
        /// 关联更新
        /// </summary>
        /// <typeparam name="TModel"></typeparam>
        /// <typeparam name="TJoin"></typeparam>
        /// <param name="expression"></param>
        /// <param name="updateValue"></param>
        /// <returns></returns>
        public override int Update <TModel, TJoin>(Expression <Func <TModel, TJoin, bool> > expression, ParameCollection updateValue)
        {
            var query = new RelationLambdaQuery <TModel>(dbContext);

            query.Join <TJoin>(expression);
            return(Update(query, updateValue));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 关联删除
        /// </summary>
        /// <typeparam name="TModel"></typeparam>
        /// <typeparam name="TJoin"></typeparam>
        /// <param name="expression"></param>
        /// <returns></returns>
        public override int Delete <TModel, TJoin>(Expression <Func <TModel, TJoin, bool> > expression)
        {
            var query = new RelationLambdaQuery <TModel>(dbContext);

            query.Join <TJoin>(expression);
            return(Delete(query));
        }