public ActionResult Delete(int rId) { Reply data = _replyServices.GetDataById(rId); _replyServices.Delete(data); return(RedirectToAction("Index", "Message")); }
public ActionResult Delete(int mId, ForPaging paging, Reply Data) { Message data = _messageServices.GetDataById(mId); List <Reply> replyList = data.Reply.ToList(); foreach (Reply delete in replyList) { _replyServices.Delete(delete); } _messageServices.Delete(data); return(RedirectToAction("Index", "Home")); }