コード例 #1
0
        public async Task <ActionResult> DeleteVisitor(int id)
        {
            var visitorModelFromRepo = await _repository.GetByIdAsync(id);

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

            await _repository.DeleteAsync(visitorModelFromRepo);

            return(NoContent());
        }