public PLevel GetLevel(string chapterName, string levelName) { PChapter _pchapter = GetChapter(chapterName); List <PLevel> levels = _connection.Query <PLevel>(string.Format("select * from PLevel where ChapterId = {0} AND Name = {1}", _pchapter.Id, levelName)); return(levels [0]); }
public void InsertChapter(PChapter p) { _connection.Insert(p); }
public IEnumerable <PLevel> GetAllLevelsInChapter(string chapterName) { PChapter _pchapter = GetChapter(chapterName); return(_connection.Table <PLevel>().Where(x => x.ChapterId == _pchapter.Id)); }
public void InsertChapter(PChapter p) { _connection.Insert (p); }