Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }