internal List <CMSContentRating> GetRatingsForContent(CMSContent content) { try { using (IDataStoreContext dataStoreContext = this._DataStore.CreateContext()) { return(dataStoreContext.cms_ContentRatings_Get(content.CMSContentId).ToList()); } } catch (Exception ex) { _Log.Error("Error at cms_ContentRatings_Get", ex); throw new DataStoreException(ex, true); } }
internal CMSContentRating GetContentRating(CMSContent content, IUserBasic userBasic) { try { using (IDataStoreContext dataStoreContext = this._DataStore.CreateContext()) { return(dataStoreContext.cms_ContentRatings_Get(userBasic.UserId, content.CMSContentId)); } } catch (Exception ex) { _Log.Error("Error at cms_ContentRatings_Get", ex); throw new DataStoreException(ex, true); } }