public async Task <ActionResult> DeleteChambers([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var chamber = await _repo.GetTById(id);

            if (chamber == null)
            {
                return(NotFound());
            }
            _repo.Delete(chamber);
            await _repo.SaveAsync(chamber);

            return(Ok(chamber));
        }
        public async Task <ActionResult> DeleteDeasisHistory([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var deasisHistory = await _repo.GetTById(id);

            if (deasisHistory == null)
            {
                return(NotFound());
            }
            _repo.Delete(deasisHistory);
            await _repo.SaveAsync(deasisHistory);

            return(Ok(deasisHistory));
        }
Beispiel #3
0
        public async Task <ActionResult> DeletePateint([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var pateint = await _repo.GetTById(id);

            if (pateint == null)
            {
                return(NotFound());
            }
            _repo.Delete(pateint);
            await _repo.SaveAsync(pateint);

            return(Ok(pateint));
        }
        public async Task <ActionResult> DeleteSpecialization([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var speacialization = await _repo.GetTById(id);

            if (speacialization == null)
            {
                return(NotFound());
            }
            _repo.Delete(speacialization);
            await _repo.SaveAsync(speacialization);

            return(Ok(speacialization));
        }