Esempio n. 1
0
        /// <summary>
        /// 取得实体
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="id">主鍵</param>
        /// <returns>实体</returns>
        public PiOrganizeEntity GetEntity(UserInfo userInfo, string id)
        {
            PiOrganizeEntity entity = null;
            var parameter           = ParameterUtil.CreateWithMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName, RDIFrameworkMessage.OrganizeService_GetEntity);

            ServiceUtil.ProcessRDIReadDb(userInfo, parameter, dbProvider =>
            {
                var manager = new PiOrganizeManager(dbProvider, userInfo);
                entity      = manager.GetEntity(id);
            });
            return(entity);
        }