Ejemplo n.º 1
0
        public IHttpActionResult Get()
        {
            var speakers = _speakerRepository.GetAll();

            var speakersWithSelfLink = speakers.Select(AddSelfLinkTo);

            foreach (var speakerWithSelfLink in speakersWithSelfLink)
            {
                speakerWithSelfLink.Sessions = speakerWithSelfLink.Sessions.Select(AddSelfLinkTo);
            }

            return(Ok(speakersWithSelfLink));
        }