public bool DeleteWishlistItem(console.Models.tbl_WishlistItem entity) { bool result = false; using (var context = new console.Models.dream_techContext()) { context.tbl_WishlistItem.Remove(entity); result = context.SaveChanges() > 1; } return(result); }
public bool UpdateWishlistItem(console.Models.tbl_WishlistItem entity) { bool result = false; using (var context = new console.Models.dream_techContext()) { tbl_WishlistItem wishlistItem = (from w in context.tbl_WishlistItem where w.wishlist_item_id == entity.wishlist_item_id select w).First(); wishlistItem.price_id = entity.price_id; wishlistItem.product_id = entity.product_id; wishlistItem.price_id = entity.price_id; result = context.SaveChanges() > 1; } return(result); }