private void DeleteNotification(Varsel varsel) { varsler.Remove(varsel); DbNotification dbNotification = new DbNotification(); if (varsel.Type == "job") { dbNotification.DeleteNotificationBasedOnJob(varsel.Uuid); } else { dbNotification.DeleteNotificationBasedOnProject(varsel.Uuid); } }