duheng
2024-09-18 b31e66629df434a535dd2411ca79267fae5bf812
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.Reflection;
 
namespace HStation.Service
{
    /// <summary>
    /// DAL辅助类
    /// </summary>
    internal class DALCreateHelper
    {
        /// <summary>
        /// 创建DAL
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public static T CreateDAL<T>()
        {
            var dbType = Settings.Assets.XhsParasHelper.Xhs.DataBase.DbType;
            var enableCache = Settings.Assets.XhsParasHelper.Xhs.DataBase.Factory.EnableCache;
            var cacheTime = Settings.Assets.XhsParasHelper.Xhs.DataBase.Factory.CacheTime;
            return Yw.DALFactory.CreateDAL3<T>(dbType, enableCache, cacheTime);
        }
    }
}