public HttpResponseMessage Delete(int id) { _testimonial.Delete(id); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public ActionResult DeletePost(Guid id) { try { var eventEntity = _testimonialService.FindBy(x => x.Id == id).Single(); _testimonialService.Delete(eventEntity); _testimonialService.Save(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(TestimonialViewModel viewModel) { try { if (ModelState.IsValid) { var entity = Mapper.Map <TestimonialViewModel, Testimonial>(viewModel); _testimonialService.Delete(entity); return(RedirectToAction("Index")); } } catch (Exception e) { ModelState.AddModelError("", e.Message); } return(View(viewModel)); }
public IActionResult Delete(int id) { _testimonialService.Delete(id); return(RedirectToAction("Index")); }
public void Delete(long tenantId, long elementId, IUnitOfWork unitOfWork = null) { _testimonialService.Delete(tenantId, elementId, unitOfWork); }