public IHttpActionResult Delete(string id)
 {
     if (id == null)
     {
         return(NotFound());
     }
     try
     {
         repo.Delete(id);
         var advertisement = repo.FindById(id);
         if (advertisement != null)
         {
             return(NotFound());
         }
         else
         {
             return(Ok());
         }
     }
     catch (Exception)
     {
         return(InternalServerError());
     }
 }
Ejemplo n.º 2
0
 public void Delete(Advertisement adver)
 {
     _advertisementRepository.Delete(adver);
 }