添加项目文件。

This commit is contained in:
cmn
2025-11-27 16:58:03 +08:00
parent c5adc0a415
commit ee1bb22e95
23 changed files with 2447 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace TelegramService.Entity
{
public class Db
{
/// <summary>
/// 数据库连接
/// </summary>
public static SqlSugarClient dbConnection
{
get
{
return new SqlSugarClient(new ConnectionConfig()
{
ConnectionString = Appsettings.Conf.ConnectionStrings.DBConnection,//连接符字串
DbType = SqlSugar.DbType.MySql, //数据库类型
IsAutoCloseConnection = true //不设成true要手动close
});
}
}
}
}