// GET: DataEntry/Details/5 public async Task <IActionResult> Details(string id) { if (id == null) { return(NotFound()); } var dataEntry = await _context.GetById(id); if (dataEntry == null) { return(NotFound()); } return(View(dataEntry)); }
public async Task <IActionResult> Delete(string id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var dataEntry = await _dataentryRepository.GetById(id); if (dataEntry == null) { return(NotFound()); } await _dataentryRepository.Delete(dataEntry); await _unitOfWork.CompleteAsync(); return(Ok()); }