public bool DeleteWishlist(console.Models.tbl_Wishlist entity) { bool result = false; using (var context = new console.Models.dream_techContext()) { context.tbl_Wishlist.Remove(entity); result = context.SaveChanges() > 1; } return(result); }
public bool UpdateWishlist(console.Models.tbl_Wishlist entity) { bool result = false; using (var context = new console.Models.dream_techContext()) { tbl_Wishlist wishlist = (from w in context.tbl_Wishlist where w.wishlist_id == entity.wishlist_id select w).First(); wishlist.user_id = entity.user_id; result = context.SaveChanges() > 1; } return(result); }