Пример #1
0
        public IHttpActionResult GetAttendee(int id)
        {
            Attendee attendee = _db.Attendees.Find(id);

            if (attendee == null)
            {
                return(NotFound());
            }
            var rv = attendee.ToDto();

            return(Ok(rv));
        }
Пример #2
0
        public IHttpActionResult DeleteAttendee(int id)
        {
            Attendee attendee = _db.Attendees.Find(id);

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

            attendee.CommunityGroupId = null;
            attendee.IsDeleted        = true;

            _db.SaveChanges();
            var rv = attendee.ToDto();

            return(Ok(rv));
        }