Пример #1
0
        public void handleUpdate(USER_BOOK a)
        {
            var udObj = db.USER_BOOK.SingleOrDefault(x => x.BOOKID == a.BOOKID);

            udObj = a;
            db.SaveChanges();
        }
Пример #2
0
 public void handleInsert(USER_BOOK a)
 {
     try
     {
         db.USER_BOOK.Add(a);
         db.SaveChanges();
     }
     catch (Exception e)
     {
         Console.WriteLine("Error: \n" + e);
     }
 }