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 }); }
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 }); }
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 }); }