using FreeSql;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
public interface IFreeSql {
///
/// 插入数据
///
///
///
IInsert Insert() where T1 : class;
///
/// 插入数据,传入实体
///
///
///
///
IInsert Insert(T1 source) where T1 : class;
///
/// 插入数据,传入实体集合
///
///
///
///
IInsert Insert(IEnumerable source) where T1 : class;
///
/// 修改数据
///
///
///
IUpdate Update() where T1 : class;
///
/// 修改数据,传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
IUpdate Update(object dywhere) where T1 : class;
///
/// 查询数据
///
///
///
ISelect Select() where T1 : class;
///
/// 查询数据,传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
ISelect Select(object dywhere) where T1 : class;
///
/// 删除数据
///
///
///
IDelete Delete() where T1 : class;
///
/// 删除数据,传入动态对象如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
///
///
/// 主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
///
IDelete Delete(object dywhere) where T1 : class;
///
/// 开启事务(不支持异步),60秒未执行完将自动提交
///
/// 事务体 () => {}
void Transaction(Action handler);
///
/// 开启事务(不支持异步)
///
/// 事务体 () => {}
/// 超时,未执行完将自动提交
void Transaction(Action handler, TimeSpan timeout);
///
/// 缓存
///
ICache Cache { get; }
///
/// 数据库访问对象
///
IAdo Ado { get; }
///
/// CodeFirst 模式开发相关方法
///
ICodeFirst CodeFirst { get; }
///
/// DbFirst 模式开发相关方法
///
IDbFirst DbFirst { get; }
}