Example #1
0
        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));
        }
Example #3
0
        public void ShowManageSchedules()
        {
            IManageSchedulesView view = new ManageSchedulesForm();

            _scheduleRepository.Attach(view);
            _adRepository.Attach(view);
            _scheduleController.ManageSchedules(view, this, _scheduleRepository);

            _scheduleRepository.Delete(view);
            _adRepository.Delete(view);
        }