public IHttpActionResult Delete(DeleteContextoCommand notaFiscal) { var validator = notaFiscal.Validar(); if (!validator.IsValid) { return(HandleValidationFailure(validator.Errors)); } return(HandleCallback(() => _notaFiscalService.Delete(notaFiscal))); }
public bool Delete(DeleteContextoCommand arquivo) { var isRemovedAll = true; foreach (var arquivoId in arquivo.Ids) { var isRemoved = _contextoRepository.Delete(arquivoId); isRemovedAll = isRemoved ? isRemovedAll : false; } return(isRemovedAll); }