예제 #1
0
        public Models.Review First(Models.ReviewSearchModel conditions = null, string userName = null)
        {
            try
            {
                var entity = RestfulProductInfo.First(conditions);

                if (!ProductInfoAccessControl.Pass(RestfulAction.Read, entity, userName))
                {
                    throw new NoAccessException("No Access");
                }

                return(entity);
            }
            catch
            {
                throw;
            }
        }
예제 #2
0
        public Models.Review Read(int id, string userName = null)
        {
            try
            {
                var entity = RestfulProductInfo.Read(id);

                if (!ProductInfoAccessControl.Pass(RestfulAction.Read, entity, userName))
                {
                    throw new NoAccessException("No Access");
                }

                return(entity);
            }
            catch
            {
                throw;
            }
        }