Example #1
0
        public IActionResult Delete(int id)
        {
            if (!_condominioService.Exists(x => x.Id == id))
            {
                return(NotFound());
            }

            try
            {
                _condominioService.Delete(id);
                return(NoContent());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }