16 lines
467 B
C#
16 lines
467 B
C#
using MySql.Data.MySqlClient;
|
|
using System.Configuration;
|
|
|
|
namespace ZXDService.Dao
|
|
{
|
|
public class DbStore
|
|
{
|
|
private static readonly string _conn = ConfigurationManager.ConnectionStrings["cmsContext"].ConnectionString;
|
|
|
|
public static MySqlConnection GetConnection()
|
|
{
|
|
DapperExtensions.DapperExtensions.SqlDialect = new DapperExtensions.Sql.MySqlDialect();
|
|
return new MySqlConnection(_conn);
|
|
}
|
|
}
|
|
} |