示例#1
0
        /// <summary>
        /// 按名称获取实体
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="userName">用户名</param>
        /// <returns>实体</returns>
        public BaseUserEntity GetObjectByUserName(BaseUserInfo userInfo, string userName)
        {
            BaseUserEntity entity = null;

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

            ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) =>
            {
                var manager = new BaseUserManager(dbHelper, userInfo);
                entity      = manager.GetObjectByUserName(userName);
            });
            return(entity);
        }