public ActionResult DeletePost(int id) { var service = new LeadService(); service.DeleteLead(id); TempData["SaveResult"] = "Your lead was deleted"; return(RedirectToAction("Index")); }
public ActionResult LeadDelete(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new LeadService(userId); service.DeleteLead(id); TempData["SaveResult"] = "Your Lead was deleted"; return(RedirectToAction("LeadIndex")); }