public async Task <IActionResult> Delete(int id) { var data = await _newsAppService.GetById(id); if (data == null) { return(NotFound()); } await _newsAppService.Remove(data.Id); return(RedirectToAction("Index")); }