public IHttpActionResult GetAttendee(int id) { Attendee attendee = _db.Attendees.Find(id); if (attendee == null) { return(NotFound()); } var rv = attendee.ToDto(); return(Ok(rv)); }
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)); }