Exemplo n.º 1
0
        public IActionResult DeleteConfirmed(int id)
        {
            PointRepository pointRepository = new PointRepository();

            pointRepository.Delete(id);

            return(RedirectToAction("Manage", "Home"));
        }
Exemplo n.º 2
0
 static public void deletePoint(int id)
 {
     using (PointRepository Pointrepo = new PointRepository())
     {
         Point temp = GetPoint(id);
         Pointrepo.Delete(temp);
         Pointrepo.Save();
     }
 }
Exemplo n.º 3
0
        public async Task <IActionResult> Delete(int id)
        {
            var point = await _pointRepository.GetById(id);

            if (point == null)
            {
                return(NotFound());
            }

            var deleted = await _pointRepository.Delete(id);

            return(Ok(deleted));
        }
Exemplo n.º 4
0
        public async Task <Unit> Handle(PointDeleteTransactionRequest request, CancellationToken cancellationToken)
        {
            var success = await PointRepository.Delete(request.Id, cancellationToken);

            return(Unit.Value);
        }