Exemplo n.º 1
0
 /// <summary>
 /// 执行一个一个获取查询条件的数据表行数的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="objectInstance">匿名参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回数据的行数。</returns>
 public static long RowCount <TEntity>(this ICommandBus bus, object objectInstance, string binary = "AND")
 {
     return(RowCount <TEntity>(bus, WhereParameters.Parse(bus.GetDbEngine(), objectInstance, binary)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// 执行一个一个获取查询条件的数据表行数的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="ps">参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回数据的行数。</returns>
 public static long RowCount <TEntity>(this ICommandBus bus, ExecuteParameterCollection ps, string binary = "AND")
 {
     return(RowCount <TEntity>(bus, WhereParameters.Parse(bus.GetDbEngine(), ps, binary)));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 执行一个以分页方式查找多项的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <typeparam name="TView">视图的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="page">分页的数据。</param>
 /// <param name="ps">参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回一个实体的分页集合。</returns>
 public static GridData <TView> FindAllPage <TEntity, TView>(this ICommandBus bus, IPagination page, ExecuteParameterCollection ps, string binary = "AND")
 {
     return(FindAllPage <TEntity, TView>(bus, page, WhereParameters.Parse(bus.GetDbEngine(), ps, binary)));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 执行一个查询条件是否存在的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="objectInstance">匿名参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回一个值,表示数据是否存在。</returns>
 public static bool ExistsWhere <TEntity>(this ICommandBus bus, object objectInstance, string binary = "AND")
 {
     return(ExistsWhere <TEntity>(bus, WhereParameters.Parse(bus.GetDbEngine(), objectInstance, binary)));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 执行一个以分页方式查找多项的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <typeparam name="TView">视图的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="page">分页的数据。</param>
 /// <param name="objectInstance">匿名参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回一个实体的分页集合。</returns>
 public static GridData <TView> FindAllPage <TEntity, TView>(this ICommandBus bus, IPagination page, object objectInstance, string binary = "AND")
 {
     return(FindAllPage <TEntity, TView>(bus, page, WhereParameters.Parse(bus.GetDbEngine(), objectInstance, binary)));
 }
Exemplo n.º 6
0
 /// <summary>
 /// 执行一个查找多项的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <typeparam name="TView">视图的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="ps">参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回一个实体的集合。</returns>
 public static List <TView> FindAllWhere <TEntity, TView>(this ICommandBus bus, ExecuteParameterCollection ps, string binary = "AND")
 {
     return(FindAllWhere <TEntity, TView>(bus, WhereParameters.Parse(bus.GetDbEngine(), ps, binary)));
 }
Exemplo n.º 7
0
 /// <summary>
 /// 执行一个查找多项的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <typeparam name="TView">视图的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="objectInstance">匿名参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回一个实体的集合。</returns>
 public static List <TView> FindAllWhere <TEntity, TView>(this ICommandBus bus, object objectInstance, string binary = "AND")
 {
     return(FindAllWhere <TEntity, TView>(bus, WhereParameters.Parse(bus.GetDbEngine(), objectInstance, binary)));
 }
Exemplo n.º 8
0
 /// <summary>
 /// 执行一个条件的修改的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="entity">实体的实例。</param>
 /// <param name="ps">参数集合。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回受影响的行。</returns>
 public static int ModifyWhere <TEntity>(this ICommandBus bus, object entity, ExecuteParameterCollection ps, string binary = "AND")
 {
     return(ModifyWhere <TEntity>(bus, entity, WhereParameters.Parse(bus.GetDbEngine(), ps, binary)));
 }
Exemplo n.º 9
0
 /// <summary>
 /// 执行一个条件的修改的命令模型。
 /// </summary>
 /// <typeparam name="TEntity">实体的数据类型。</typeparam>
 /// <param name="bus">命令总线。</param>
 /// <param name="entity">实体的实例。</param>
 /// <param name="objectInstance">匿名参数集合实例。</param>
 /// <param name="binary">二元运算符。</param>
 /// <returns>返回受影响的行。</returns>
 public static int ModifyWhere <TEntity>(this ICommandBus bus, object entity, object objectInstance, string binary = "AND")
 {
     return(ModifyWhere <TEntity>(bus, entity, WhereParameters.Parse(bus.GetDbEngine(), objectInstance, binary)));
 }