Exemplo n.º 1
0
        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="tableName">表名</param>
        /// <param name="id">主键</param>
        /// <returns>实体</returns>
        public BaseParameterEntity GetObject(BaseUserInfo userInfo, string tableName, string id)
        {
            BaseParameterEntity entity = null;

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) =>
            {
                var manager = new BaseParameterManager(dbHelper, userInfo, tableName);
                entity      = manager.GetObject(id);
            });

            return(entity);
        }