예제 #1
0
        /// <summary>
        /// 查询操作实例添加主键查询条件
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <typeparam name="TPrimary"></typeparam>
        /// <param name="select">查询操作实例</param>
        /// <param name="primaryKey">主键</param>
        /// <returns></returns>
        public static ISelect <TEntity> WhereByPrimaryKey <TEntity, TPrimary>(this ISelect <TEntity> select, TPrimary primaryKey) where TEntity : class
        {
            PrimaryKeyOperator <TEntity, TPrimary> .SelectWhere(select, primaryKey);

            return(select);
        }
예제 #2
0
        /// <summary>
        /// 更新操作实例添加主键查询条件
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <typeparam name="TPrimary"></typeparam>
        /// <param name="update">更新操作实例</param>
        /// <param name="primaryKey">主键</param>
        /// <returns></returns>
        public static IUpdate <TEntity> WhereByPrimaryKey <TEntity, TPrimary>(this IUpdate <TEntity> update, TPrimary primaryKey) where TEntity : class
        {
            PrimaryKeyOperator <TEntity, TPrimary> .UpdateWhere(update, primaryKey);

            return(update);
        }
예제 #3
0
        /// <summary>
        /// 删除操作实例添加主键查询条件
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <param name="delete">删除操作实例</param>
        /// <param name="entity">实体类</param>
        /// <returns></returns>
        public static IDelete <TEntity> WhereByPrimaryKeyFromEntity <TEntity>(this IDelete <TEntity> delete, TEntity entity) where TEntity : class
        {
            PrimaryKeyOperator <TEntity> .DeleteWhere(delete, entity);

            return(delete);
        }
예제 #4
0
        /// <summary>
        /// 查询操作实例添加主键查询条件
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <param name="select">查询操作实例</param>
        /// <param name="entity">实体类</param>
        /// <returns></returns>
        public static ISelect <TEntity> WhereByPrimaryKeyFromEntity <TEntity>(this ISelect <TEntity> select, TEntity entity) where TEntity : class
        {
            PrimaryKeyOperator <TEntity> .SelectWhere(select, entity);

            return(select);
        }
예제 #5
0
        /// <summary>
        /// 更新操作实例添加主键查询条件
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <param name="update">更新操作实例</param>
        /// <param name="entity">实体类</param>
        /// <returns></returns>
        public static IUpdate <TEntity> WhereByPrimaryKeyFromEntity <TEntity>(this IUpdate <TEntity> update, TEntity entity) where TEntity : class
        {
            PrimaryKeyOperator <TEntity> .UpdateWhere(update, entity);

            return(update);
        }
예제 #6
0
        /// <summary>
        /// 删除操作实例添加主键查询条件
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <typeparam name="TPrimary"></typeparam>
        /// <param name="delete">删除操作实例</param>
        /// <param name="primaryKey">主键</param>
        /// <returns></returns>
        public static IDelete <TEntity> WhereByPrimaryKey <TEntity, TPrimary>(this IDelete <TEntity> delete, TPrimary primaryKey) where TEntity : class
        {
            PrimaryKeyOperator <TEntity, TPrimary> .DeleteWhere(delete, primaryKey);

            return(delete);
        }