public IHttpActionResult Delete(int id) { var Ad = adRepo.Get(id); adRepo.Delete(id); specificationRepo.Delete(Ad.SpecId); addressRepo.Delete(Ad.AddressId); return(StatusCode(HttpStatusCode.NoContent)); }
[Route("api/requestAd/{id}")] //deleting ad public IHttpActionResult Delete(int id) { var adr = adRepo.Get(id); adRepo.Delete(id); specRepo.Delete(adr.SpecId); addressRepo.Delete(adr.AddressId); return(StatusCode(HttpStatusCode.NoContent)); }
public void ShowManageSchedules() { IManageSchedulesView view = new ManageSchedulesForm(); _scheduleRepository.Attach(view); _adRepository.Attach(view); _scheduleController.ManageSchedules(view, this, _scheduleRepository); _scheduleRepository.Delete(view); _adRepository.Delete(view); }