/// <summary> /// Gets the model matching the given where expression. /// </summary> /// <param name="where">The where expression</param> /// <returns>The model</returns> public virtual T GetSingle(Expression <Func <T, bool> > where = null) { var model = session.Get <T>(where).SingleOrDefault(); if (model != null) { return(FromDb(model)); } return(null); }
/// <summary> /// Gets the ratings matching the given where expression. /// </summary> /// <param name="where">The optional where expression</param> /// <returns>The matching ratings</returns> public IEnumerable <Models.Rating> Get(Expression <Func <Models.Rating, bool> > where = null) { return(session.Get <Models.Rating>(where)); }