Esempio n. 1
0
 public static int ToevoegenLesgever(Lesgever lesgever)
 {
     using (UdemyEntities udemyEntities = new UdemyEntities())
     {
         try
         {
             udemyEntities.Lesgever.Add(lesgever);
             return(udemyEntities.SaveChanges());
         }
         catch (Exception ex)
         {
             FileOperations.Foutloggen(ex);
             return(0);
         }
     }
 }
Esempio n. 2
0
        public static int AanpassenGegevensLesgever(Lesgever lesgever)
        {
            try
            {
                using (UdemyEntities udemyEntities = new UdemyEntities())
                {
                    udemyEntities.Entry(lesgever).State = EntityState.Modified;
                    return(udemyEntities.SaveChanges());
                }
            }
            catch (Exception ex)
            {
                FileOperations.Foutloggen(ex);
                return(0);

                throw;
            }
        }