Example #1
0
        public ActionResult DeleteUsaState(int id)
        {
            var usastatesModelFromRepo = _repository.GetUsaStateById(id);

            if (usastatesModelFromRepo == null)
            {
                return(NotFound());
            }

            _repository.DeleteUsaState(usastatesModelFromRepo);
            _repository.SaveChanges();

            return(NoContent());
        }