public ActionResult <Wishlist> Delete(int id) { Wishlist wishlist = _wishlistRepository.GetBy(id); if (wishlist == null) { return(NotFound()); } _wishlistRepository.Delete(wishlist); _wishlistRepository.SaveChanges(); return(wishlist); }
public bool Delete(Guid adId, string currentUserID) { try { return(_repository.Delete(adId, currentUserID)); } catch (Exception ex) { _logger.LogError("Exception while deleting wishlist : {0} - {1} ", ex.StackTrace, ex.Message); throw ex; } }
public async Task ClearOldTestWishlists() { var summaries = await _wishlistSummaryRepository.GetUser(testAccountId); foreach (var summary in summaries.Wishlists) { var wishlist = await _repository.Load(summary); if (wishlist.Name.Contains("[Test]")) { foreach (var p in wishlist.People) { await _wishlistSummaryRepository.RemoveWishlistFromPerson(p.PersonId, wishlist.Id); } await _repository.Delete(wishlist.Id); } } }
public void Delete(int id) { _wishlistRepository.Delete(id); }
public async Task DeleteEventFromWishListAsync(WishlistRequestModel wishlistRequestModel) { var entityToDelete = await _whishlistRepository.GetWhishlistByUserAndConcertIdAsync(wishlistRequestModel.UserId, wishlistRequestModel.ConcertId); _whishlistRepository.Delete(entityToDelete); }
/// <summary> /// Deletes the specified book identifier. /// </summary> /// <param name="bookId">The book identifier.</param> /// <param name="userId">The user identifier.</param> /// <returns>Boolean result in 1/0 format</returns> public async Task <int> Delete(int bookId, int userId) { return(await _repository.Delete(bookId, userId)); }