public async Task DeleteListing(DeleteListingRequest deleteListingRequest, string userId) { try { await _listingRepository.DeleteListing(deleteListingRequest.UserListingId, deleteListingRequest.OwnerId); } catch (Exception e) { Console.WriteLine(e); throw; } }
public HttpResponseMessage Delete(int listingId) { HttpResponseMessage response; try { listingRespository.DeleteListing(listingId); listingRespository.Save(); } catch (Exception ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError, "Error"); return(response); } response = Request.CreateResponse(HttpStatusCode.OK, "Success"); return(response); }
public void DeleteListing(int listingId) { listingRepository.DeleteListing(listingId); unitOfWork.Save(); }
public IActionResult Delete(Listing listing) { repository.DeleteListing(listing.Id); return(RedirectToAction("Index")); }
public async Task <bool> DeleteListing(int id) { int returnValue = await _listingRepository.DeleteListing(id); return(true); }
public async Task <int> DeleteListing(int id) { return(await _listingRepository.DeleteListing(id)); }
public IActionResult DeleteListing(Listing listing) { listingRepository.DeleteListing(listing); return(RedirectToAction("Listings")); }
public void DeleteListing(int id) { _listingRepository.DeleteListing(id); _elastic.DeleteAsync <ElasticListing>(id); }