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; } }
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; } }