예제 #1
0
        private Task <TalkSummary[]> GetOtherTalksBySpeaker(string id)
        {
            var talk  = Talks.FirstOrDefault(t => t.Id == id);
            var talks = Talks.Where(t => t.Id != id && t.Speaker == talk.Speaker)
                        .Take(10).Select(MapTalkToSummary).ToArray();

            return(Task.FromResult(talks));
        }
예제 #2
0
        public Task <Talk> UpdateTalk(string id, UpdatedTalk talk, string version)
        {
            var oldTalk = Talks.FirstOrDefault(t => t.Id == id);

            oldTalk.Headline    = talk.Headline;
            oldTalk.Description = talk.Description;

            return(Task.FromResult(oldTalk));
        }