コード例 #1
0
        public async Task DeleteAsync(DeleteProcessamentRequestModel requestModel)
        {
            var processament = await processamentRepository.GetByUserCPFAsync(requestModel.CPF);

            switch (processament != null)
            {
            case true:
            {
                await processamentRepository.DeleteAsync(processament);

                break;
            }

            case false: throw new Exception("The CPF doenst exists.");
            }
        }
コード例 #2
0
        public async Task <IActionResult> Delete([FromRoute] DeleteProcessamentRequestModel requestModel)
        {
            await processamentService.DeleteAsync(requestModel);

            return(Ok("Processament deleted successfully."));
        }