Esempio n. 1
0
        public async Task <IActionResult> DeleteConfirmed(Guid id, [FromForm] Guid facilityId)
        {
            try
            {
                await service.DeleteAsync(id);

                return(RedirectToAction("details", "facility", new { id = facilityId }));
            }
            catch (AccommodationNotFoundException)
            {
                return(View("NotFound"));
            }
        }
        public async Task <IActionResult> Delete(Guid id)
        {
            try
            {
                await service.DeleteAsync(id);

                return(new NoContentResult());
            }
            catch (AccommodationNotFoundException)
            {
                return(NotFound());
            }
        }
Esempio n. 3
0
        public async Task <IActionResult> Delete([FromRoute] Guid id)
        {
            await _accommodationService.DeleteAsync(id);

            return(NoContent());
        }