Ejemplo n.º 1
0
        public async Task DeleteInsurance(ViewModel.DeleteInsuranceRequest request)
        {
            var insurance = await _insuranceRepository.GetInsuranceAsync(request.InsuranceId);

            insurance.Delete();
            _insuranceRepository.DeleteInsurance(insurance);

            await _insuranceRepository.UnitOfWork.SaveEntitiesAsync();
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteInsurance([FromBody] ViewModel.DeleteInsuranceRequest request)
        {
            await _insuranceService.DeleteInsurance(request);

            return(Ok());
        }