Exemplo n.º 1
0
 public async Task DeleteListing(DeleteListingRequest deleteListingRequest, string userId)
 {
     try
     {
         await _listingRepository.DeleteListing(deleteListingRequest.UserListingId,
                                                deleteListingRequest.OwnerId);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void DeleteListing(int listingId)
 {
     listingRepository.DeleteListing(listingId);
     unitOfWork.Save();
 }
Exemplo n.º 4
0
 public IActionResult Delete(Listing listing)
 {
     repository.DeleteListing(listing.Id);
     return(RedirectToAction("Index"));
 }
Exemplo n.º 5
0
        public async Task <bool> DeleteListing(int id)
        {
            int returnValue = await _listingRepository.DeleteListing(id);

            return(true);
        }
Exemplo n.º 6
0
 public async Task <int> DeleteListing(int id)
 {
     return(await _listingRepository.DeleteListing(id));
 }
Exemplo n.º 7
0
        public IActionResult DeleteListing(Listing listing)
        {
            listingRepository.DeleteListing(listing);

            return(RedirectToAction("Listings"));
        }
Exemplo n.º 8
0
 public void DeleteListing(int id)
 {
     _listingRepository.DeleteListing(id);
     _elastic.DeleteAsync <ElasticListing>(id);
 }