public void DeleteReportedPost(int id) { Reports report = context.Reports.Where(x => x.postId == id).FirstOrDefault(); context.Reports.Remove(report); Post post = context.Post.Where(x => x.pId == id).FirstOrDefault(); postDAO.Delete(post.pId); }
public void Delete(int postId) { postDao.Delete(postId); }