public ActionResult DeleteConfirmed(int id) { JobAdvertisement jobAdvertisement = jobAdvertisementService.GetEntity(id); jobAdvertisementService.DeleteEntity(jobAdvertisement); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Worker worker = workerService.GetEntity(id); workerService.DeleteEntity(worker); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Employer employer = employerService.GetEntity(id); employerService.DeleteEntity(employer); employerService.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Category category = categoryService.GetEntity(id); categoryService.DeleteEntity(category); categoryService.SaveChanges(); return(RedirectToAction("Index")); }
public IHttpActionResult Delete(int id) { try { var entity = userService.GetEntity(id); userService.DeleteEntity(entity); var model = Mapping.mapper.Map <UsersModel>(entity); return(Ok(model)); //hangi kaydı sildiğini görmesi için. } catch (Exception) { return(BadRequest()); } }
public IHttpActionResult Delete(int id) { try { var entity = userService.GetEntity(e => e.Id == id && e.IsDeleted == false); userService.DeleteEntity(id); var model = Mapping.mapper.Map <UsersModel>(entity); return(Ok(model)); } catch (Exception exc) { return(BadRequest()); } }