Beispiel #1
0
        public static void handleUpdate(BOOK a)
        {
            var udObj = db.BOOKS.SingleOrDefault(x => x.ID == a.ID);

            udObj = a;
            db.SaveChanges();
        }
Beispiel #2
0
 public static void handleInsert(BOOK a)
 {
     try
     {
         db.BOOKS.Add(a);
         db.SaveChanges();
     }
     catch (Exception e)
     {
         Console.WriteLine("Error: \n" + e);
     }
 }