public async Task <TalkDetail> GetTalkDetail(string id) { var detail = Talks.Select(MapTalkToDetail).FirstOrDefault(t => t.Id == id); detail.SpeakerTalks = await GetOtherTalksBySpeaker(id); return(detail); }
public Task <Talk> CreateTalk(NewTalk talk) { var newTalk = new Talk() { Id = "Talks/" + (Talks.Select(t => int.Parse(DocumentId.NoPrefix(t.Id))).Max() + 1), Headline = talk.Headline, Description = talk.Description, Speaker = talk.Speaker }; Talks = new List <Talk>(Talks) { newTalk }; return(Task.FromResult(newTalk)); }