Пример #1
0
        public void DeletUserLecture(UserLecture userLecture)
        {
            // SQL statement delete
            string sql = "Delete UserLecture where Id = @id";

            // Uitvoeren SQL statement en doorgeven parametercollectie
            db.Execute(sql, new { userLecture.Id });
        }
Пример #2
0
        public void InsertUserLecture(UserLecture userLecture)
        {
            // SQL statement Insert
            string sql = "Insert UserLecture(lectureId,userId) values(@lectureId,@userId)";

            // Uitvoeren SQL statement en doorgeven parametercollectie
            db.Execute(sql, new { userLecture.LectureId, userLecture.UserId });
        }
Пример #3
0
        public void UpdateUserLecture(UserLecture userLecture)
        {
            // SQL statement update
            string sql = "Update UserLecture set lectureId=@lectureId, userId=@userId where Id = @id";

            // Uitvoeren SQL statement en doorgeven parametercollectie
            db.Execute(sql, new { userLecture.LectureId, userLecture.UserId, userLecture.Id });
        }