コード例 #1
0
ファイル: ContextoController.cs プロジェクト: arthals/tcc2
        public IHttpActionResult Delete(DeleteContextoCommand notaFiscal)
        {
            var validator = notaFiscal.Validar();

            if (!validator.IsValid)
            {
                return(HandleValidationFailure(validator.Errors));
            }
            return(HandleCallback(() => _notaFiscalService.Delete(notaFiscal)));
        }
コード例 #2
0
ファイル: ContextoService.cs プロジェクト: arthals/tcc2
        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);
        }