/// <summary> /// 创建数据库连接会话 /// </summary> /// <returns></returns> public static IDbSession CreateSession() { IDbConnection conn = CreateConnection(); IDbSession session = new DbSession(conn); return session; }
/// <summary> /// 创建数据库事务会话 /// </summary> /// <param name="conn"></param> /// <param name="trans"></param> /// <returns></returns> public static IDbSession CreateSession(IDbConnection conn, IDbTransaction trans) { IDbSession session = new DbSession(conn, trans); return session; }
/// <summary> /// 创建数据库事务会话 /// </summary> /// <param name="conn"></param> /// <param name="trans"></param> /// <returns></returns> public static IDbSession CreateSession(IDbConnection conn, IDbTransaction trans) { IDbSession session = new DbSession(conn, trans); return(session); }