Beispiel #1
0
    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]);
    }
Beispiel #2
0
 public void InsertChapter(PChapter p)
 {
     _connection.Insert(p);
 }
Beispiel #3
0
    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);
 }