56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
using SA.Core.Init;
|
|
using Serilog;
|
|
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SA.Core.Init
|
|
{
|
|
public class InitDB
|
|
{
|
|
public static SqlSugarScope auditDb = new SqlSugarScope(new ConnectionConfig()
|
|
{
|
|
ConnectionString = InitConfiguration.GetConnectionString("auditMySqlConnection"),
|
|
DbType = DbType.MySql,
|
|
IsAutoCloseConnection = true
|
|
},
|
|
db =>
|
|
{
|
|
db.Aop.OnLogExecuted = (sql, pars) =>
|
|
{
|
|
//LogHelper.Info(sql, pars);
|
|
};
|
|
});
|
|
|
|
public static SqlSugarScope zxdcrmDb = new SqlSugarScope(new ConnectionConfig()
|
|
{
|
|
ConnectionString = InitConfiguration.GetConnectionString("zxdcrmMySqlConnection"),
|
|
DbType = DbType.MySql,
|
|
IsAutoCloseConnection = true
|
|
},
|
|
db =>
|
|
{
|
|
db.Aop.OnLogExecuted = (sql, pars) =>
|
|
{
|
|
//LogHelper.Info(sql, pars);
|
|
};
|
|
});
|
|
|
|
public static SqlSugarScope dbcrmDb = new SqlSugarScope(new ConnectionConfig()
|
|
{
|
|
ConnectionString = InitConfiguration.GetConnectionString("dbcrm"),
|
|
DbType = DbType.MySql,
|
|
IsAutoCloseConnection = true
|
|
},
|
|
db =>
|
|
{
|
|
db.Aop.OnLogExecuted = (sql, pars) =>
|
|
{
|
|
//LogHelper.Info(sql, pars);
|
|
};
|
|
});
|
|
}
|
|
} |