/* * * Komentáře k bugu * */ //Přidání komentáře k bugu public int?AddCommentBug(BugCommentModel comment) { comment.TimeChanged = DateTime.Now; using (IDbConnection db = new SqlConnection(ConnectionString)) { return(db.Insert(comment)); } }
//UNUSED //Aktualizace komentáře u bugu public int?UpdateCommentBug(BugCommentModel comment) { using (IDbConnection db = new SqlConnection(ConnectionString)) { string query = @"update tbBugComment SET content = @content, timechanged = @timechanged where Id = @cmntId"; var result = db.Execute(query, new { content = comment.Content, timechanged = comment.TimeChanged, cmntId = comment.Id }); return(result); } }