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)); }
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)); }