FreeSql ISelect/IUpdate/IInsert/IDelete 增加 AsTable 方法,实现分表

This commit is contained in:
28810
2019-03-05 21:04:52 +08:00
parent f9fef12d37
commit 90f69f1b57
38 changed files with 813 additions and 87 deletions

View File

@ -39,6 +39,12 @@ namespace FreeSql {
/// <returns></returns>
IDelete<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class;
/// <summary>
/// 设置表名规则,可用于分库/分表参数1默认表名返回值新表名
/// </summary>
/// <param name="dataTable"></param>
/// <returns></returns>
IDelete<T1> AsTable(Func<string, string> tableRule);
/// <summary>
/// 返回即将执行的SQL语句
/// </summary>

View File

@ -32,6 +32,12 @@ namespace FreeSql {
/// <returns></returns>
IInsert<T1> IgnoreColumns(Expression<Func<T1, object>> columns);
/// <summary>
/// 设置表名规则,可用于分库/分表参数1默认表名返回值新表名
/// </summary>
/// <param name="dataTable"></param>
/// <returns></returns>
IInsert<T1> AsTable(Func<string, string> tableRule);
/// <summary>
/// 返回即将执行的SQL语句
/// </summary>

View File

@ -35,6 +35,12 @@ namespace FreeSql {
T1 First();
Task<T1> FirstAsync();
/// <summary>
/// 设置表名规则,可用于分库/分表参数1实体类型参数2默认表名返回值新表名
/// </summary>
/// <param name="dataTable"></param>
/// <returns></returns>
TSelect AsTable(Func<Type, string, string> tableRule);
/// <summary>
/// 返回即将执行的SQL语句
/// </summary>

View File

@ -82,6 +82,12 @@ namespace FreeSql {
/// <returns></returns>
IUpdate<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class;
/// <summary>
/// 设置表名规则,可用于分库/分表参数1默认表名返回值新表名
/// </summary>
/// <param name="dataTable"></param>
/// <returns></returns>
IUpdate<T1> AsTable(Func<string, string> tableRule);
/// <summary>
/// 返回即将执行的SQL语句
/// </summary>