public async Task <ActionResult> DeleteVisitor(int id) { var visitorModelFromRepo = await _repository.GetByIdAsync(id); if (visitorModelFromRepo == null) { return(NotFound()); } await _repository.DeleteAsync(visitorModelFromRepo); return(NoContent()); }