Esempio n. 1
0
 public static int VerwijderenCursus(Cursus cursus)
 {
     try
     {
         using (UdemyEntities udemyEntities = new UdemyEntities())
         {
             udemyEntities.Entry(cursus).State = EntityState.Deleted;
             return(udemyEntities.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         FileOperations.Foutloggen(ex);
         return(0);
     }
 }
Esempio n. 2
0
        public static int AanpassenGegevensStudent(Student student)
        {
            try
            {
                using (UdemyEntities udemyEntities = new UdemyEntities())
                {
                    udemyEntities.Entry(student).State = EntityState.Modified;
                    return(udemyEntities.SaveChanges());
                }
            }
            catch (Exception ex)
            {
                FileOperations.Foutloggen(ex);
                return(0);

                throw;
            }
        }