Пример #1
0
        public async Task <IActionResult> DeregisterBoat(int id)
        {
            try
            {
                var result = await _boatBusinessLogic.RemoveBoat(id);

                if (!result)
                {
                    return(NotFound($"Boat with ID: {id} not found"));
                }
                return(Ok($"Boat with ID: {id} successfully deleted"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }