DotNet.Utilities/DbUtilities/DbHelper.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//-----------------------------------------------------------------
// All Rights Reserved , Copyright (C) 2015 , Hairihan TECH, Ltd.
//-----------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
namespace DotNet.Utilities
{
/// <summary>
/// DbHelper
/// 有关数据库连接的方法。
///
/// 修改纪录
///
/// 2011.09.18 版本:2.0 JiRiGaLa 采用默认参数技术,把一些方法进行简化。
/// 2008.09.03 版本:1.0 JiRiGaLa 创建。
///
/// <author>
/// <name>JiRiGaLa</name>
/// <date>2011.09.18</date>
/// </author>
/// </summary>
public partial class DbHelper
{
#region public static DbType GetDbType(string dbType) 数据库连接的类型判断
/// <summary>
/// 数据库连接的类型判断
/// </summary>
/// <param name="dbType">数据库类型</param>
/// <returns>数据库类型</returns>
public static CurrentDbType GetDbType(string dbType)
{
CurrentDbType result = CurrentDbType.SqlServer;
foreach (CurrentDbType currentDbType in Enum.GetValues(typeof(CurrentDbType)))
{
if (currentDbType.ToString().Equals(dbType))
{
result = currentDbType;
break;
}
}
return result;
}
#endregion
#region public static CommandType GetCommandType(string commandType) 数据库连接的类型判断
/// <summary>
/// 数据库连接的类型判断
/// </summary>
/// <param name="commandType">命令类型</param>
/// <returns>命令类型</returns>
public static CommandType GetCommandType(string commandType)
{
CommandType result = CommandType.Text;
foreach (CommandType currentCommandType in Enum.GetValues(typeof(CommandType)))
{
if (currentCommandType.ToString().Equals(commandType))
后面还有 59 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
