public void AddRegistration(long id, long attendeeId) { using (var repo = new EventRepository()) { repo.AddRegistration(id, attendeeId); } }