Пример #1
0
 public void UpdateWishList(Entities.WishList wishObj, int WishID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.WishList    bkUpdate = dbCtx.WishLists.First(b => b.WishID == WishID);
     BaseRepository.CopyPropertyValues(wishObj, bkUpdate);
     bkUpdate.WishID = WishID;
     dbCtx.SaveChanges();
 }
Пример #2
0
 public void InsertWishList(Entities.WishList wishObj)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.WishLists.Add(wishObj);
     dbCtx.SaveChanges();
 }